aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-utils.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-11 06:20:46 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-11 06:20:46 +0800
commit21e2e4efd803c8c904cecf039ee73fead0e6c4c1 (patch)
tree10cf3f440e8de068bb09ad20d720397b39ecc113 /app/scripts/lib/tx-utils.js
parent2dc87b4bd4fa7d068def5d1fb9c72bd233d6ef47 (diff)
downloadtangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar.gz
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar.bz2
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar.lz
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar.xz
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.tar.zst
tangerine-wallet-browser-21e2e4efd803c8c904cecf039ee73fead0e6c4c1.zip
Remove erroneous OOG estimation logic.
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r--app/scripts/lib/tx-utils.js17
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) {