diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-03-25 05:13:57 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-03-25 05:13:57 +0800 |
commit | 30e8d250138bef588d25619b9fc9563dbbb8ecac (patch) | |
tree | 563330742d202a9aa8fccc2b7234c6e259f8ea90 /app/scripts/lib/tx-utils.js | |
parent | 2e446eb5880396716d919e10e97a7ab824cc0fc1 (diff) | |
parent | fb39539214ca888300eb192e0e137a512cc0d88a (diff) | |
download | tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar.gz tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar.bz2 tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar.lz tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar.xz tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.tar.zst tangerine-wallet-browser-30e8d250138bef588d25619b9fc9563dbbb8ecac.zip |
Merge branch 'master' into i1210-txdisappearance
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-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 +} |