1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

Add indicator for specified gas price

This commit is contained in:
Kevin Serrano 2017-10-05 09:58:04 -07:00
parent 35f4148343
commit 15809894ff
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -169,6 +169,7 @@ module.exports = class TransactionController extends EventEmitter {
async addTxDefaults (txMeta) {
const txParams = txMeta.txParams
// ensure value
txMeta.gasPriceSpecified = Boolean(txParams.gasPrice)
const gasPrice = txParams.gasPrice || await this.query.gasPrice()
txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16))
txParams.value = txParams.value || '0x0'