From 67eba9f542588f13d37aa5e10c659c93d6e58dc1 Mon Sep 17 00:00:00 2001 From: Frankie Date: Thu, 13 Oct 2016 16:04:23 -0700 Subject: [PATCH] Specify base 10 in bignumber --- app/scripts/lib/id-management.js | 2 +- ui/app/components/pending-tx-details.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/id-management.js b/app/scripts/lib/id-management.js index 002f03047..421f2105f 100644 --- a/app/scripts/lib/id-management.js +++ b/app/scripts/lib/id-management.js @@ -28,7 +28,7 @@ function IdManagement (opts) { // calculate gas with custom gas multiplier var gasMultiplier = this.configManager.getGasMultiplier() || 1 var gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice), 16) - gasPrice = gasPrice.mul(new BN(gasMultiplier * 100)).div(new BN(100, 10)) + gasPrice = gasPrice.mul(new BN(gasMultiplier * 100, 10)).div(new BN(100, 10)) txParams.gasPrice = ethUtil.intToHex(gasPrice.toNumber()) // normalize values diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index 0f7e20613..545302098 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -32,7 +32,7 @@ PTXP.render = function () { 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 = gasPrice.mul(new BN(gasMultiplier * 100)).div(new BN(100, 10)) + gasPrice = gasPrice.mul(new BN(gasMultiplier * 100), 10).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)