diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2019-04-11 11:03:54 +0800 |
---|---|---|
committer | Hsuan Lee <boczeratul@gmail.com> | 2019-04-11 11:03:54 +0800 |
commit | bd0636e81e06c1602bdbf4da123f245af4a0c6f3 (patch) | |
tree | 22a653b87afb01e963442fabf769344fef00f753 | |
parent | cdb1b8b5dff26b384b421e4dcb7f593eee58b191 (diff) | |
download | dexon-wallet-bd0636e81e06c1602bdbf4da123f245af4a0c6f3.tar.gz dexon-wallet-bd0636e81e06c1602bdbf4da123f245af4a0c6f3.tar.zst dexon-wallet-bd0636e81e06c1602bdbf4da123f245af4a0c6f3.zip |
Change gas estimate when tx may fail
-rw-r--r-- | ui/app/components/send/send.utils.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ui/app/components/send/send.utils.js b/ui/app/components/send/send.utils.js index b2ac41e9..b60c802f 100644 --- a/ui/app/components/send/send.utils.js +++ b/ui/app/components/send/send.utils.js @@ -236,13 +236,9 @@ async function estimateGas ({ } } - // if not, fall back to block gasLimit - paramsForGasEstimate.gas = ethUtil.addHexPrefix(multiplyCurrencies(blockGasLimit, 0.95, { - multiplicandBase: 16, - multiplierBase: 10, - roundDown: '0', - toNumericBase: 'hex', - })) + // if not, fall back to base token cost + paramsForGasEstimate.gas = BASE_TOKEN_GAS_COST + // run tx return new Promise((resolve, reject) => { return estimateGasMethod(paramsForGasEstimate, (err, estimatedGas) => { |