Bind ethQuery to estimateGas to allow it to be moved around.

feature/default_network_editable
Dan Finlay 8 years ago
parent 85d5b12f8d
commit ff3f6cc36a
  1. 4
      app/scripts/keyring-controller.js

@ -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…
Cancel
Save