wallet: always displays fee with fixed precision

This commit is contained in:
Herich 2017-07-25 16:32:35 +02:00 committed by Roman Volosovskyi
parent 98b58c9036
commit 59edcb37ef
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ function calculateFee(n, tx) {
}
var gasMultiplicator = Math.pow(1.4, n).toFixed(3);
return web3.fromWei(web3.eth.gasPrice * gasMultiplicator * estimatedGas, "ether");
var weiFee = web3.eth.gasPrice * gasMultiplicator * estimatedGas;
return parseFloat(web3.fromWei(weiFee, "ether")).toFixed(7);
}
function calculateGasPrice(n) {