The Enter Amount screen now correctly sets the amount when sendMax() is called when available funds exceed the max limit.

This commit is contained in:
Brendon Duncan 2018-09-04 12:52:54 +12:00
commit 4315d16f73
4 changed files with 37 additions and 12 deletions

View file

@ -78,11 +78,15 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
function onBeforeEnter(event, data) {
console.log('walletSelector onBeforeEnter sendflow ', sendFlowService.state);
console.log('review onBeforeEnter sendflow ', sendFlowService.state);
defaults = configService.getDefaults();
sendFlowData = sendFlowService.getStateClone();
originWalletId = sendFlowData.fromWalletId;
satoshis = parseInt(sendFlowData.amount, 10);
if (typeof sendFlowData.amount === 'string') {
satoshis = parseInt(sendFlowData.amount, 10);
} else {
satoshis = sendFlowData.amount;
}
toAddress = sendFlowData.toAddress;
destinationWalletId = sendFlowData.toWalletId;