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) diff --git a/new-lamassu-admin/src/pages/Wizard/components/Wallet/AllSet.js b/new-lamassu-admin/src/pages/Wizard/components/Wallet/AllSet.js index ae891826..911762c8 100644 --- a/new-lamassu-admin/src/pages/Wizard/components/Wallet/AllSet.js +++ b/new-lamassu-admin/src/pages/Wizard/components/Wallet/AllSet.js @@ -1,5 +1,4 @@ import { useQuery, useMutation } from '@apollo/react-hooks' -import { utils as coinUtils } from '@lamassu/coins' import { makeStyles } from '@material-ui/core' import gql from 'graphql-tag' import * as R from 'ramda' @@ -54,13 +53,9 @@ const AllSet = ({ data: currentData, doContinue }) => { const cryptoCurrencies = data?.cryptoCurrencies ?? [] const save = () => { - const defaultCryptoUnit = R.head( - R.keys(coinUtils.getCryptoCurrency(coin).units) - ) const adjustedData = { zeroConfLimit: 0, - ...currentData, - cryptoUnits: defaultCryptoUnit + ...currentData } if (!WalletSchema.isValidSync(adjustedData)) return setError(true)