Fix estimate mining profits calculator

pull/20/merge
fancoder 2014-08-18 16:21:16 +04:00
parent 2d40840a72
commit 5acd0f147f
1 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@
}
#calcHashResultsHolder{
min-width: 145px;
max-width: 145px;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -458,10 +458,10 @@
function calcEstimateProfit(){
try {
var rateUnit = Math.pow(1024,parseInt($('#calcHashUnit').data('mul')));
var inp2 = parseFloat($('#calcHashRate').val()) * rateUnit;
var resl = 16 / ((lastStats.network.difficulty / inp2) / 86400);
if (!isNaN(resl)) {
updateText('calcHashAmount', (Math.round(resl * 100) / 100).toString());
var hashRate = parseFloat($('#calcHashRate').val()) * rateUnit;
var profit = (hashRate * 86400 / lastStats.network.difficulty) * lastStats.network.reward;
if (profit) {
updateText('calcHashAmount', getReadableCoins(profit, 2, true));
return;
}
}