aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-01-09 05:34:52 +0800
committerGitHub <noreply@github.com>2018-01-09 05:34:52 +0800
commitf441bb7248d4b62d0d96897817655d348db0c29b (patch)
tree671db03d75b41ba318378fab6b670f146fa94ccb /app
parent2147b8a59a81334bf9b2d9b3fad713967db7f3c7 (diff)
parent9a8670309d2791b212d04ee795f70040cc5f40fc (diff)
downloadtangerine-wallet-browser-f441bb7248d4b62d0d96897817655d348db0c29b.tar.gz
tangerine-wallet-browser-f441bb7248d4b62d0d96897817655d348db0c29b.tar.zst
tangerine-wallet-browser-f441bb7248d4b62d0d96897817655d348db0c29b.zip
Merge pull request #2896 from MetaMask/kumavis-patch-2
bugfix - transaction controller - fix order of operations
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/transactions.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 469deb670..ded9739a8 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -180,8 +180,10 @@ module.exports = class TransactionController extends EventEmitter {
// ensure value
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
txMeta.nonceSpecified = Boolean(txParams.nonce)
- const gasPrice = txParams.gasPrice || this.getGasPrice ? this.getGasPrice()
- : await this.query.gasPrice()
+ let gasPrice = txParams.gasPrice
+ if (!gasPrice) {
+ gasPrice = this.getGasPrice ? this.getGasPrice() : await this.query.gasPrice()
+ }
txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16))
txParams.value = txParams.value || '0x0'
// set gasLimit