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

Merge pull request #1509 from MetaMask/i1473-dappDefaultGasPrice

I1473 dapp default gas price
This commit is contained in:
Dan Finlay 2017-06-27 21:00:08 -07:00 committed by GitHub
commit ddba2af415
2 changed files with 10 additions and 7 deletions

View File

@ -10,6 +10,7 @@
- Seed word confirmation wording is now scarier. - Seed word confirmation wording is now scarier.
- Fix error for invalid seed words. - Fix error for invalid seed words.
- Prevent users from submitting two duplicate transactions by disabling submit. - 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 ## 3.7.8 2017-6-12

View File

@ -150,13 +150,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 () {