Skip to content

Commit

Permalink
Revert "Fixed issue where coin limits are lost when switching between…
Browse files Browse the repository at this point in the history
… Coin and Currency modes."

This reverts commit 14533e7.
  • Loading branch information
Angel Mortega committed Jun 5, 2019
1 parent 14533e7 commit 573efa7
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions src/js/controllers/amount.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,23 +734,20 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
}

function updateMaximumButtonIfNeeded() {
console.log('sendmax updateMaximumButtonIfNeeded()');
console.log('sendmax updateMaximumButtonIfNeeded()');
if (vm.showSendMaxButton || vm.showSendLimitMaxButton) {
if(vm.fromWallet) {
setMaximumButtonFromWallet(vm.fromWallet);
} else {
transactionSendableAmount.fiat = '';
vm.sendableFunds = transactionSendableAmount.crypto;
if (availableUnits[unitIndex].isFiat) {
var coin = availableUnits[altUnitIndex].id;
txFormatService.formatAlternativeStr(coin, transactionSendableAmount.satoshis, function formatCallback(formatted){
if (formatted) {
$scope.$apply(function onApply() {
vm.sendableFunds = formatted;
});
}
});
}
transactionSendableAmount.fiat = '';
vm.sendableFunds = transactionSendableAmount.crypto;

if (availableUnits[unitIndex].isFiat) {
var coin = availableUnits[altUnitIndex].id;
txFormatService.formatAlternativeStr(coin, transactionSendableAmount.satoshis, function formatCallback(formatted){
if (formatted) {
$scope.$apply(function onApply() {
vm.sendableFunds = formatted;
});
}
});
}
}
}
Expand Down

0 comments on commit 573efa7

Please sign in to comment.