aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-24 08:11:39 +0800
committerGitHub <noreply@github.com>2017-03-24 08:11:39 +0800
commit9e39f85ea1709859b09ed6f3953339b6a6362781 (patch)
tree761eb185cfb22e7f609b4298027735b40a17c974
parentf29a116d4027e387180aa1232d35afcc15b920b0 (diff)
parent2cab2f767c4cfe6d42899ca51ef5aa36d5eaf456 (diff)
downloadtangerine-wallet-browser-9e39f85ea1709859b09ed6f3953339b6a6362781.tar.gz
tangerine-wallet-browser-9e39f85ea1709859b09ed6f3953339b6a6362781.tar.zst
tangerine-wallet-browser-9e39f85ea1709859b09ed6f3953339b6a6362781.zip
Merge pull request #1257 from MetaMask/i1256-RemoveGasLimitParam
Remove gas limit param
-rw-r--r--app/scripts/lib/tx-utils.js6
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
+}