From 235cb1f2d790a7bda349ab0d33ad1009751a8536 Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Mon, 19 Jun 2017 17:50:06 -0700 Subject: [PATCH 1/2] Keeps dapp gas price if set --- app/scripts/controllers/transactions.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index d9d9849b1..e3c2d74d3 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -152,13 +152,15 @@ module.exports = class TransactionController extends EventEmitter { const txParams = txMeta.txParams // ensure value txParams.value = txParams.value || '0x0' - this.query.gasPrice((err, gasPrice) => { - if (err) return cb(err) - // set gasPrice - txParams.gasPrice = gasPrice - // set gasLimit - this.txProviderUtils.analyzeGasUsage(txMeta, cb) - }) + if (!txParams.gasPrice) { + this.query.gasPrice((err, gasPrice) => { + if (err) return cb(err) + // set gasPrice + txParams.gasPrice = gasPrice + }) + } + // set gasLimit + this.txProviderUtils.analyzeGasUsage(txMeta, cb) } getUnapprovedTxList () { From ca832959c224a184c0ad40f5dd4239ec261b7f6b Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Tue, 27 Jun 2017 10:34:02 -0700 Subject: [PATCH 2/2] Update change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96dc79d9a..a6b988b4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Seed word confirmation wording is now scarier. - Fix error for invalid seed words. - Prevent users from submitting two duplicate transactions by disabling submit. +- Allow Dapps to specify gas price as hex string. ## 3.7.8 2017-6-12