aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-utils.js
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-06-03 06:18:14 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-06-03 06:18:14 +0800
commit2b7d8424981fbbd0f6306b5ee7abf8754f9f7092 (patch)
tree3947f5acf75e8560a837d083373011c3444a6e38 /app/scripts/lib/tx-utils.js
parent9eea990425f1f68eabca8b283bdfc662befcd226 (diff)
downloadtangerine-wallet-browser-2b7d8424981fbbd0f6306b5ee7abf8754f9f7092.tar.gz
tangerine-wallet-browser-2b7d8424981fbbd0f6306b5ee7abf8754f9f7092.tar.zst
tangerine-wallet-browser-2b7d8424981fbbd0f6306b5ee7abf8754f9f7092.zip
Update gasblocklimit params with every block.
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r--app/scripts/lib/tx-utils.js9
1 files changed, 0 insertions, 9 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js
index 658f3bedc..149d93102 100644
--- a/app/scripts/lib/tx-utils.js
+++ b/app/scripts/lib/tx-utils.js
@@ -21,21 +21,12 @@ module.exports = class txProviderUtils {
this.query.getBlockByNumber('latest', true, (err, block) => {
if (err) return cb(err)
async.waterfall([
- self.setBlockGasLimit.bind(self, txMeta, block.gasLimit),
self.estimateTxGas.bind(self, txMeta, block.gasLimit),
self.setTxGas.bind(self, txMeta, block.gasLimit),
], cb)
})
}
- setBlockGasLimit (txMeta, blockGasLimitHex, cb) {
- const blockGasLimitBN = hexToBn(blockGasLimitHex)
- const saferGasLimitBN = BnMultiplyByFraction(blockGasLimitBN, 19, 20)
- txMeta.blockGasLimit = bnToHex(saferGasLimitBN)
- cb()
- return
- }
-
estimateTxGas (txMeta, blockGasLimitHex, cb) {
const txParams = txMeta.txParams
// check if gasLimit is already specified