diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index b754ba22b..e5fcf07e6 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -31,18 +31,6 @@ angular.module('copayApp.controllers').controller('amountController', function($ var configCache = configService.getSync(); availableUnits = []; - var hasBTCWallets = profileService.getWallets({ - coin: 'btc' - }).length; - - if (hasBTCWallets) { - availableUnits.push({ - name: 'Bitcoin', - id: 'btc', - shortName: (configCache.bitcoinAlias || defaults.bitcoinAlias).toUpperCase(), - }); - } - var hasBCHWallets = profileService.getWallets({ coin: 'bch' }).length; @@ -55,6 +43,18 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); }; + var hasBTCWallets = profileService.getWallets({ + coin: 'btc' + }).length; + + if (hasBTCWallets) { + availableUnits.push({ + name: 'Bitcoin', + id: 'btc', + shortName: (configCache.bitcoinAlias || defaults.bitcoinAlias).toUpperCase(), + }); + } + unitIndex = 0; if (data.stateParams.coin) {