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:
commit
ddba2af415
@ -10,6 +10,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
|
||||
|
||||
|
@ -150,13 +150,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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user