aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx-details.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-10-13 10:35:09 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-10-14 06:10:29 +0800
commitc400f7c0f6bff13400eedcd80fdc83e572eb42a8 (patch)
tree2c7baacd4f7439488e53d412ef2daf8fde520878 /ui/app/components/pending-tx-details.js
parent229d95956bc36ec413533df00389f8c5127e050b (diff)
downloadtangerine-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.js4
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)