wallet: always displays fee with fixed precision
This commit is contained in:
parent
98b58c9036
commit
59edcb37ef
|
@ -5,7 +5,8 @@ function calculateFee(n, tx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var gasMultiplicator = Math.pow(1.4, n).toFixed(3);
|
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) {
|
function calculateGasPrice(n) {
|
||||||
|
|
Loading…
Reference in New Issue