diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-03-25 04:56:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-25 04:56:30 +0800 |
commit | 3a888ede2adbab8cea19edef16a013af276837f1 (patch) | |
tree | 706ad96992d46095aadfcb8bdf4a7d1d6c0c5bbc /app | |
parent | 16c76d522960298476492b53a02d1b490b84b858 (diff) | |
parent | 393c7faf28bd94f16c16427f33d830b3b7241538 (diff) | |
download | tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar.gz tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar.bz2 tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar.lz tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar.xz tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.tar.zst tangerine-wallet-browser-3a888ede2adbab8cea19edef16a013af276837f1.zip |
Merge branch 'master' into notice-modification
Diffstat (limited to 'app')
-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 +} |