Currency in send max button now updates with currency change.

This commit is contained in:
Brendon Duncan 2018-09-03 20:17:46 +12:00
commit b7dda8b6ca

View file

@ -620,7 +620,6 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode; availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode;
fiatCode = newAltCurrency.isoCode; fiatCode = newAltCurrency.isoCode;
updateAvailableFundsStringIfNeeded(); updateAvailableFundsStringIfNeeded();
updateMaximumButtonIfNeeded();
updateUnitUI(); updateUnitUI();
close(); close();
}); });
@ -641,6 +640,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
} }
}); });
} }
updateMaximumButtonIfNeeded();
} }
} }
@ -681,6 +681,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
} }
function updateMaximumButtonIfNeeded() { function updateMaximumButtonIfNeeded() {
console.log('sendmax updateMaximumButtonIfNeeded()');
if (vm.showSendMaxButton || vm.showSendLimitMaxButton) { if (vm.showSendMaxButton || vm.showSendLimitMaxButton) {
transactionSendableAmount.fiat = ''; transactionSendableAmount.fiat = '';
vm.sendableFunds = transactionSendableAmount.crypto; vm.sendableFunds = transactionSendableAmount.crypto;