One step closer to getting send max working.

This commit is contained in:
Brendon Duncan 2018-08-06 21:46:03 +12:00
commit cea77e910f

View file

@ -594,7 +594,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
channel = "ga"; channel = "ga";
} }
// When displaying Fiat, if the formatting fails, the crypto will be the primary amount. // When displaying Fiat, if the formatting fails, the crypto will be the primary amount.
var amount = priceDisplayIsFiat ? vm.secondaryAmount || vm.primaryAmount : vm.primaryAmount; var amount = unitFromSat * satoshis;
var log = new window.BitAnalytics.LogEvent("transfer_success", [{ var log = new window.BitAnalytics.LogEvent("transfer_success", [{
"coin": vm.originWallet.coin, "coin": vm.originWallet.coin,
"type": "outgoing", "type": "outgoing",
@ -678,7 +678,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
tx.sendMaxInfo = sendMaxInfo; tx.sendMaxInfo = sendMaxInfo;
tx.amount = tx.sendMaxInfo.amount; tx.amount = tx.sendMaxInfo.amount;
updateAmount(); satoshis = tx.amount;
updateSendAmounts();
ongoingProcess.set('calculatingFee', false); ongoingProcess.set('calculatingFee', false);
$timeout(function() { $timeout(function() {
showSendMaxWarning(wallet, sendMaxInfo); showSendMaxWarning(wallet, sendMaxInfo);