Skip to content

Commit

Permalink
UI hashrate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hesido committed Aug 19, 2018
1 parent e99b8e6 commit 64ad917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
}
}

$('span.workerhashrate').text(workerhashrate.toFixed(1));
$('span.workerhashrate').text((workerhashrate || 1).toFixed(1));

$('#workers').append($('<span>combined : '+combined.toFixed(2)+' kH/s<br/></span>'));

Expand All @@ -237,7 +237,7 @@
let activeCoin = coinList.filter((c) => c.symbol == activeCoinId)[0];

for (var coin of coinList) {
let hashrate = (activeCoin && activeCoin.hashrate && coin.hashrate) ? coin.hashrate / activeCoin.hashrate * workerhashrate : (coin.hashrate || 1);
let hashrate = (activeCoin && activeCoin.hashrate && coin.hashrate) ? coin.hashrate / activeCoin.hashrate * (workerhashrate || 1) : (coin.hashrate || 1);
let seconds = (new Date().getTime() / 1000) - localtimeskew;
let row = $("#row_" + coin.symbol);
row.find( ".hashrate" ).text((coin.network.coindifficultytarget) ? getReadableHashRateString(coin.network.difficulty / coin.network.coindifficultytarget) + '/sec' : "N/A");
Expand Down

0 comments on commit 64ad917

Please sign in to comment.