diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-01-11 06:25:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 06:25:59 +0800 |
commit | 0197d54bfcab15edf0eb0fc0a290dab7b6181a2a (patch) | |
tree | 88ab1d18a9f923458492b969d0f558eff693a431 /app/scripts/lib/tx-utils.js | |
parent | 2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47 (diff) | |
parent | 55a55754d02672982bb57c496b5773e8ea1b8869 (diff) | |
download | tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar.gz tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar.bz2 tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar.lz tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar.xz tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.tar.zst tangerine-wallet-browser-0197d54bfcab15edf0eb0fc0a290dab7b6181a2a.zip |
Merge pull request #986 from MetaMask/i947-BrowserSolidityError
Fix browser solidity error
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r-- | app/scripts/lib/tx-utils.js | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index a976173f5..d1fb98f42 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -20,7 +20,6 @@ module.exports = class txProviderUtils { if (err) return cb(err) async.waterfall([ self.estimateTxGas.bind(self, txData, block.gasLimit), - self.checkForTxGasError.bind(self, txData), self.setTxGas.bind(self, txData, block.gasLimit), ], cb) }) @@ -38,22 +37,10 @@ module.exports = class txProviderUtils { this.query.estimateGas(txParams, cb) } - checkForTxGasError (txData, estimatedGasHex, cb) { + setTxGas (txData, blockGasLimitHex, estimatedGasHex, cb) { txData.estimatedGas = estimatedGasHex - // all gas used - must be an error - if (estimatedGasHex === txData.txParams.gas) { - txData.simulationFails = true - } - cb() - } - - setTxGas (txData, blockGasLimitHex, cb) { const txParams = txData.txParams - // if OOG, nothing more to do - if (txData.simulationFails) { - cb() - return - } + // if gasLimit was specified and doesnt OOG, // use original specified amount if (txData.gasLimitSpecified) { |