From ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 29 Nov 2016 14:13:12 -0800 Subject: [PATCH] Bind ethQuery to estimateGas to allow it to be moved around. --- app/scripts/keyring-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 0045890be..7976a9e3a 100644 --- a/app/scripts/keyring-controller.js +++ b/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)