diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-06-28 12:00:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 12:00:08 +0800 |
commit | ddba2af4152668a5767ce874a4727873c72bac72 (patch) | |
tree | ce43b1d7d15dcbcb932d0810e49fbfa68ba87705 /app | |
parent | 3fde5481ef45cbe731a2486855022afe7c1344fe (diff) | |
parent | ca832959c224a184c0ad40f5dd4239ec261b7f6b (diff) | |
download | tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar.gz tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar.bz2 tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar.lz tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar.xz tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.tar.zst tangerine-wallet-browser-ddba2af4152668a5767ce874a4727873c72bac72.zip |
Merge pull request #1509 from MetaMask/i1473-dappDefaultGasPrice
I1473 dapp default gas price
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/transactions.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 31cf8239a..52251d66e 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -150,13 +150,15 @@ module.exports = class TransactionController extends EventEmitter { const txParams = txMeta.txParams // ensure value txParams.value = txParams.value || '0x0' - this.query.gasPrice((err, gasPrice) => { - if (err) return cb(err) - // set gasPrice - txParams.gasPrice = gasPrice - // set gasLimit - this.txProviderUtils.analyzeGasUsage(txMeta, cb) - }) + if (!txParams.gasPrice) { + this.query.gasPrice((err, gasPrice) => { + if (err) return cb(err) + // set gasPrice + txParams.gasPrice = gasPrice + }) + } + // set gasLimit + this.txProviderUtils.analyzeGasUsage(txMeta, cb) } getUnapprovedTxList () { |