diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-02-16 23:59:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 23:59:20 +0800 |
commit | c0893f2bcc0bf6163265bf75a4afad387169afd1 (patch) | |
tree | 444f2ff7967dd7bebee0c4792b490beee8f50f8e /app | |
parent | b046378e335f23b7c2447c2ad40fe4d8ab2da67a (diff) | |
parent | dc3f3e79ca7319b97255456a5225a266d38a4d6f (diff) | |
download | tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar.gz tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar.bz2 tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar.lz tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar.xz tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.tar.zst tangerine-wallet-browser-c0893f2bcc0bf6163265bf75a4afad387169afd1.zip |
Merge pull request #3250 from MetaMask/i#3136
fix - hex prefix estimatedGas on txMeta
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/tx-gas-utils.js | 5 |
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, |