diff options
author | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-11-08 09:52:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-08 09:52:08 +0800 |
commit | a21f6f5f6348303cab3bc845c621432c4f753e00 (patch) | |
tree | f2cb10316fd7435c1969c4cf043c29e05eec6527 /ui/app/send-v2.js | |
parent | da2e9b9765ca32e7439a2a5687e6c3d8ca8bb63c (diff) | |
parent | d1977225a48f381f3a6bda4a54ce9e0e0914357e (diff) | |
download | tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar.gz tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar.bz2 tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar.lz tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar.xz tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.tar.zst tangerine-wallet-browser-a21f6f5f6348303cab3bc845c621432c4f753e00.zip |
Merge pull request #2549 from danjm/NewUI-flat-send-amount-fixes
[NewUI] Fix issues with amount max
Diffstat (limited to 'ui/app/send-v2.js')
-rw-r--r-- | ui/app/send-v2.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js index 8c8b97a6d..0cef47b27 100644 --- a/ui/app/send-v2.js +++ b/ui/app/send-v2.js @@ -307,7 +307,6 @@ SendTransactionScreen.prototype.handleAmountChange = function (value) { SendTransactionScreen.prototype.setAmountToMax = function () { const { from: { balance }, - gasTotal, updateSendAmount, updateSendErrors, updateGasPrice, @@ -323,14 +322,16 @@ SendTransactionScreen.prototype.setAmountToMax = function () { ? multiplyCurrencies(tokenBalance, multiplier, {toNumericBase: 'hex'}) : subtractCurrencies( ethUtil.addHexPrefix(balance), - ethUtil.addHexPrefix(gasTotal), + ethUtil.addHexPrefix(MIN_GAS_TOTAL), { toNumericBase: 'hex' } ) updateSendErrors({ amount: null }) - updateGasPrice(MIN_GAS_PRICE_HEX) - updateGasLimit(MIN_GAS_LIMIT_HEX) - updateGasTotal(MIN_GAS_TOTAL) + if (!selectedToken) { + updateGasPrice(MIN_GAS_PRICE_HEX) + updateGasLimit(MIN_GAS_LIMIT_HEX) + updateGasTotal(MIN_GAS_TOTAL) + } updateSendAmount(maxAmount) } |