aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-06-28 12:00:08 +0800
committerGitHub <noreply@github.com>2017-06-28 12:00:08 +0800
commitddba2af4152668a5767ce874a4727873c72bac72 (patch)
treece43b1d7d15dcbcb932d0810e49fbfa68ba87705 /app
parent3fde5481ef45cbe731a2486855022afe7c1344fe (diff)
parentca832959c224a184c0ad40f5dd4239ec261b7f6b (diff)
downloadtangerine-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.js16
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 () {