aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-gas-utils.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-03-07 06:59:09 +0800
committerDan Finlay <dan@danfinlay.com>2018-03-07 06:59:09 +0800
commit423f084cb47d84e2e9063a6567454f83592f424b (patch)
treebc2f3040cd76765fa27bbfc0e3913cf5e466c063 /app/scripts/lib/tx-gas-utils.js
parent8ba64c657ff801425c06db166e2c9a06289047de (diff)
parent303801d2768a264a27a51916e5debf778739ee0c (diff)
downloadtangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.gz
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.bz2
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.lz
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.xz
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.zst
tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.zip
Merge branch 'master' into i3076-UseStorageLocalInstead
Diffstat (limited to 'app/scripts/lib/tx-gas-utils.js')
-rw-r--r--app/scripts/lib/tx-gas-utils.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/lib/tx-gas-utils.js b/app/scripts/lib/tx-gas-utils.js
index f68f3a9e2..6f6ff7852 100644
--- a/app/scripts/lib/tx-gas-utils.js
+++ b/app/scripts/lib/tx-gas-utils.js
@@ -4,6 +4,7 @@ const {
BnMultiplyByFraction,
bnToHex,
} = require('./util')
+const addHexPrefix = require('ethereumjs-util').addHexPrefix
const SIMPLE_GAS_COST = '0x5208' // Hex for 21000, cost of a simple send.
/*
@@ -13,7 +14,7 @@ and used to do things like calculate gas of a tx.
*/
module.exports = class TxGasUtil {
-
+
constructor (provider) {
this.query = new EthQuery(provider)
}
@@ -68,7 +69,7 @@ module.exports = class TxGasUtil {
}
setTxGas (txMeta, blockGasLimitHex, estimatedGasHex) {
- txMeta.estimatedGas = estimatedGasHex
+ txMeta.estimatedGas = addHexPrefix(estimatedGasHex)
const txParams = txMeta.txParams
// if gasLimit was specified and doesnt OOG,