From 624352607eacfbc572cadd2440676306093f8688 Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Thu, 20 Oct 2022 20:08:13 +0200 Subject: [PATCH] fix: `getCryptoUnits` default value fix: `getCryptosFromWalletNamespace` returns 'advanced' --- lib/new-config-manager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/new-config-manager.js b/lib/new-config-manager.js index c44653e4..8428d6a6 100644 --- a/lib/new-config-manager.js +++ b/lib/new-config-manager.js @@ -145,13 +145,13 @@ const getTriggersAutomation = (customInfoRequests, config) => { const splitGetFirst = _.compose(_.head, _.split('_')) -const getCryptosFromWalletNamespace = config => { - return _.uniq(_.map(splitGetFirst, _.keys(fromNamespace('wallets', config)))) -} +const getCryptosFromWalletNamespace = + _.compose(_.without(['advanced']), _.uniq, _.map(splitGetFirst), _.keys, fromNamespace('wallets')) const getCashInSettings = config => fromNamespace(namespaces.CASH_IN)(config) -const getCryptoUnits = (crypto, config) => getWalletSettings(crypto, config).cryptoUnits +const getCryptoUnits = (crypto, config) => + getWalletSettings(crypto, config).cryptoUnits ?? 'full' const setTermsConditions = toNamespace(namespaces.TERMS_CONDITIONS)