Merge pull request #2896 from MetaMask/kumavis-patch-2

bugfix - transaction controller - fix order of operations
feature/default_network_editable
Dan Finlay 7 years ago committed by GitHub
commit f441bb7248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      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

Loading…
Cancel
Save