diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-03-24 04:56:32 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-03-24 04:56:32 +0800 |
commit | 2cab2f767c4cfe6d42899ca51ef5aa36d5eaf456 (patch) | |
tree | 761eb185cfb22e7f609b4298027735b40a17c974 | |
parent | f29a116d4027e387180aa1232d35afcc15b920b0 (diff) | |
download | tangerine-wallet-browser-2cab2f767c4cfe6d42899ca51ef5aa36d5eaf456.tar.gz tangerine-wallet-browser-2cab2f767c4cfe6d42899ca51ef5aa36d5eaf456.tar.zst tangerine-wallet-browser-2cab2f767c4cfe6d42899ca51ef5aa36d5eaf456.zip |
Remove gas limit param
Fixes #1256 by removing redundant param.
-rw-r--r-- | app/scripts/lib/tx-utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index c6814c05f..7988f83e9 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -63,7 +63,7 @@ module.exports = class txProviderUtils { const initialGasLimitBn = hexToBn(initialGasLimitHex) const blockGasLimitBn = hexToBn(blockGasLimitHex) const bufferedGasLimitBn = initialGasLimitBn.muln(1.5) - + // if initialGasLimit is above blockGasLimit, dont modify it if (initialGasLimitBn.gt(blockGasLimitBn)) return bnToHex(initialGasLimitBn) // if bufferedGasLimit is below blockGasLimit, use bufferedGasLimit @@ -99,7 +99,7 @@ module.exports = class txProviderUtils { txParams.from = normalize(txParams.from) txParams.value = normalize(txParams.value) txParams.data = normalize(txParams.data) - txParams.gasLimit = normalize(txParams.gasLimit || txParams.gas) + txParams.gas = normalize(txParams.gas || txParams.gasLimit) txParams.nonce = normalize(txParams.nonce) // build ethTx log.info(`Prepared tx for signing: ${JSON.stringify(txParams)}`) @@ -134,4 +134,4 @@ function bnToHex(inputBn) { function hexToBn(inputHex) { return new BN(ethUtil.stripHexPrefix(inputHex), 16) -}
\ No newline at end of file +} |