diff options
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) } |