mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-23 03:36:18 +02:00
Merge pull request #2291 from MetaMask/gasPriceSpecified
Add boolean for specified gas price
This commit is contained in:
commit
e0030a8bf8
@ -170,6 +170,7 @@ module.exports = class TransactionController extends EventEmitter {
|
|||||||
async addTxDefaults (txMeta) {
|
async addTxDefaults (txMeta) {
|
||||||
const txParams = txMeta.txParams
|
const txParams = txMeta.txParams
|
||||||
// ensure value
|
// ensure value
|
||||||
|
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
|
||||||
const gasPrice = txParams.gasPrice || await this.query.gasPrice()
|
const gasPrice = txParams.gasPrice || 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'
|
||||||
|
Loading…
Reference in New Issue
Block a user