diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-24 08:11:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 08:11:56 +0800 |
commit | 9c6391f6e0ac25bab959da54277f726ff40959b7 (patch) | |
tree | 4ebc2634fe1b483e6e240b48a1b352543f6dde26 | |
parent | 6a46e9ce0662413f6351756658b2bae8a895a33b (diff) | |
parent | 9e39f85ea1709859b09ed6f3953339b6a6362781 (diff) | |
download | tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar.gz tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar.bz2 tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar.lz tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar.xz tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.tar.zst tangerine-wallet-browser-9c6391f6e0ac25bab959da54277f726ff40959b7.zip |
Merge branch 'master' into i1234-HardGasLimits-BrowserForm
-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 +} |