aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-30 06:13:12 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-30 06:13:12 +0800
commitff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162 (patch)
tree80967a6d3aca9e23f8b0e7bf5572018154426c61
parent85d5b12f8dd4029bf93a7fb0b5f65b306cbaaa3c (diff)
downloadtangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar.gz
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar.bz2
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar.lz
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar.xz
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.tar.zst
tangerine-wallet-browser-ff3f6cc36adcc9a3c780d6cc0f2a05c3c45c3162.zip
Bind ethQuery to estimateGas to allow it to be moved around.
-rw-r--r--app/scripts/keyring-controller.js4
1 files 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)