diff options
author | Dan Finlay <flyswatter@users.noreply.github.com> | 2017-03-25 04:53:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-25 04:53:45 +0800 |
commit | c15dfccaa4770539152acdfb81d623f0569e2d51 (patch) | |
tree | 1595c6287f87162e987f76c8f580f87a06ad2cb3 /app | |
parent | 61a62038084c29fb29c8445feca36bce9e756471 (diff) | |
parent | 393c7faf28bd94f16c16427f33d830b3b7241538 (diff) | |
download | tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar.gz tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar.bz2 tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar.lz tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar.xz tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.tar.zst tangerine-wallet-browser-c15dfccaa4770539152acdfb81d623f0569e2d51.zip |
Merge branch 'master' into kovan-notice
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 +} |