aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send.utils.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-06-16 05:36:52 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-06-16 05:36:52 +0800
commit5685c4bafed0458e350b401791e108b8162a88e0 (patch)
treed6008af37952ac17d8ada6a5d1304edbb7bcc084 /ui/app/components/send_/send.utils.js
parente4d3bdba125964042480e35847747903f3de7ac3 (diff)
downloadtangerine-wallet-browser-5685c4bafed0458e350b401791e108b8162a88e0.tar.gz
tangerine-wallet-browser-5685c4bafed0458e350b401791e108b8162a88e0.tar.zst
tangerine-wallet-browser-5685c4bafed0458e350b401791e108b8162a88e0.zip
Estimate gas limit when the token amount changes. Fix amount input
Diffstat (limited to 'ui/app/components/send_/send.utils.js')
-rw-r--r--ui/app/components/send_/send.utils.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js
index 8772d464b..3d8e1a882 100644
--- a/ui/app/components/send_/send.utils.js
+++ b/ui/app/components/send_/send.utils.js
@@ -203,21 +203,13 @@ async function estimateGas ({ selectedAddress, selectedToken, blockGasLimit, to,
err.message.includes('gas required exceeds allowance or always failing transaction')
)
if (simulationFailed) {
- const estimateWithBuffer = addGasBuffer(
- paramsForGasEstimate.gas,
- blockGasLimit,
- selectedToken ? 2 : 1.5
- )
+ const estimateWithBuffer = addGasBuffer(paramsForGasEstimate.gas, blockGasLimit, 1.5)
return resolve(ethUtil.addHexPrefix(estimateWithBuffer))
} else {
return reject(err)
}
}
- const estimateWithBuffer = addGasBuffer(
- estimatedGas.toString(16),
- blockGasLimit,
- selectedToken ? 2 : 1.5
- )
+ const estimateWithBuffer = addGasBuffer(estimatedGas.toString(16), blockGasLimit, 1.5)
return resolve(ethUtil.addHexPrefix(estimateWithBuffer))
})
})