1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Keeps dapp gas price if set

This commit is contained in:
Thomas Huang 2017-06-19 17:50:06 -07:00
parent fcf14b7aa7
commit 235cb1f2d7

View File

@ -152,13 +152,15 @@ module.exports = class TransactionController extends EventEmitter {
const txParams = txMeta.txParams const txParams = txMeta.txParams
// ensure value // ensure value
txParams.value = txParams.value || '0x0' txParams.value = txParams.value || '0x0'
this.query.gasPrice((err, gasPrice) => { if (!txParams.gasPrice) {
if (err) return cb(err) this.query.gasPrice((err, gasPrice) => {
// set gasPrice if (err) return cb(err)
txParams.gasPrice = gasPrice // set gasPrice
// set gasLimit txParams.gasPrice = gasPrice
this.txProviderUtils.analyzeGasUsage(txMeta, cb) })
}) }
// set gasLimit
this.txProviderUtils.analyzeGasUsage(txMeta, cb)
} }
getUnapprovedTxList () { getUnapprovedTxList () {