Added correct float to string conversion on frontend
parent
53d3dd4fba
commit
b5a3b0cba6
|
@ -256,6 +256,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
function floatToString(float) {
|
||||
return float.toFixed(6).replace(/[0\.]+$/, '');
|
||||
}
|
||||
|
||||
|
||||
var xhrPageLoading;
|
||||
function routePage(loadedCallback) {
|
||||
|
|
|
@ -349,13 +349,13 @@
|
|||
totalDonation += lastStats.config.donation[i];
|
||||
}
|
||||
totalFee += totalDonation;
|
||||
updateText('poolDonations', totalDonation.toFixed(1) + '% to open-source devs');
|
||||
updateText('poolDonations', floatToString(totalDonation) + '% to open-source devs');
|
||||
}
|
||||
else{
|
||||
$('#donations').hide()
|
||||
}
|
||||
|
||||
updateText('poolFee', totalFee + '%');
|
||||
updateText('poolFee', floatToString(totalFee) + '%');
|
||||
|
||||
|
||||
updateText('blockSolvedTime', getReadableTime(lastStats.network.difficulty / lastStats.pool.hashrate));
|
||||
|
|
Loading…
Reference in New Issue