diff options
Diffstat (limited to 'app/scripts/lib/id-management.js')
-rw-r--r-- | app/scripts/lib/id-management.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/id-management.js b/app/scripts/lib/id-management.js index 2a985265c..002f03047 100644 --- a/app/scripts/lib/id-management.js +++ b/app/scripts/lib/id-management.js @@ -26,10 +26,10 @@ function IdManagement (opts) { this.signTx = function (txParams) { // calculate gas with custom gas multiplier - var gasMultiplier = txParams.gasMultiplier || 1 - delete txParams.gasMultiplier - var gasPrice = parseFloat(new BN(ethUtil.stripHexPrefix(txParams.gasPrice), 16).toString()) * gasMultiplier - txParams.gasPrice = ethUtil.intToHex(parseInt(gasPrice)) + 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)) + txParams.gasPrice = ethUtil.intToHex(gasPrice.toNumber()) // normalize values txParams.to = ethUtil.addHexPrefix(txParams.to) |