mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #2896 from MetaMask/kumavis-patch-2
bugfix - transaction controller - fix order of operations
This commit is contained in:
commit
f441bb7248
@ -180,8 +180,10 @@ module.exports = class TransactionController extends EventEmitter {
|
|||||||
// ensure value
|
// ensure value
|
||||||
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
|
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
|
||||||
txMeta.nonceSpecified = Boolean(txParams.nonce)
|
txMeta.nonceSpecified = Boolean(txParams.nonce)
|
||||||
const gasPrice = txParams.gasPrice || this.getGasPrice ? this.getGasPrice()
|
let gasPrice = txParams.gasPrice
|
||||||
: await this.query.gasPrice()
|
if (!gasPrice) {
|
||||||
|
gasPrice = this.getGasPrice ? this.getGasPrice() : await this.query.gasPrice()
|
||||||
|
}
|
||||||
txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16))
|
txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16))
|
||||||
txParams.value = txParams.value || '0x0'
|
txParams.value = txParams.value || '0x0'
|
||||||
// set gasLimit
|
// set gasLimit
|
||||||
|
Loading…
Reference in New Issue
Block a user