mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Bind ethQuery to estimateGas to allow it to be moved around.
This commit is contained in:
parent
85d5b12f8d
commit
ff3f6cc36a
@ -375,14 +375,14 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
query.getBlockByNumber('latest', true, function (err, block) {
|
||||
if (err) return cb(err)
|
||||
async.waterfall([
|
||||
bind(estimateGas, txData, block.gasLimit),
|
||||
bind(estimateGas, query, txData, block.gasLimit),
|
||||
bind(checkForGasError, txData),
|
||||
bind(setTxGas, txData, block.gasLimit),
|
||||
], cb)
|
||||
})
|
||||
}
|
||||
|
||||
function estimateGas (txData, blockGasLimitHex, cb) {
|
||||
function estimateGas (query, txData, blockGasLimitHex, cb) {
|
||||
const txParams = txData.txParams
|
||||
// check if gasLimit is already specified
|
||||
txData.gasLimitSpecified = Boolean(txParams.gas)
|
||||
|
Loading…
Reference in New Issue
Block a user