From 63ae7fb589b43d2af87f31d51f5b5f96669dabe0 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 8 Jan 2018 13:19:18 -0800 Subject: bugfix - transactions controller - breakout logic and fix order of operations bug --- app/scripts/controllers/transactions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/scripts') 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 -- cgit