diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-10-13 10:35:09 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-10-14 06:10:29 +0800 |
commit | c400f7c0f6bff13400eedcd80fdc83e572eb42a8 (patch) | |
tree | 2c7baacd4f7439488e53d412ef2daf8fde520878 /ui/app/components/pending-tx-details.js | |
parent | 229d95956bc36ec413533df00389f8c5127e050b (diff) | |
download | tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar.gz tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar.bz2 tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar.lz tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar.xz tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.tar.zst tangerine-wallet-browser-c400f7c0f6bff13400eedcd80fdc83e572eb42a8.zip |
Fix gasPrice range
Diffstat (limited to 'ui/app/components/pending-tx-details.js')
-rw-r--r-- | ui/app/components/pending-tx-details.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index 7fa3d6ddd..0f7e20613 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -29,10 +29,10 @@ PTXP.render = function () { var account = props.accounts[address] var balance = account ? account.balance : '0x0' - var gasMultiplier = txParams.gasMultiplier + var gasMultiplier = txData.gasMultiplier var gasCost = new BN(ethUtil.stripHexPrefix(txParams.gas || txData.estimatedGas), 16) var gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice || '0x4a817c800'), 16) - gasPrice = new BN(parseFloat(gasPrice.toString()) * gasMultiplier) + gasPrice = gasPrice.mul(new BN(gasMultiplier * 100)).div(new BN(100, 10)) var txFee = gasCost.mul(gasPrice) var txValue = new BN(ethUtil.stripHexPrefix(txParams.value || '0x0'), 16) var maxCost = txValue.add(txFee) |