Show getnetworkhashps core result in dashboard + update unit formatting

This commit is contained in:
nymkappa 2022-04-30 17:19:03 +09:00
parent b6fcf40565
commit 1f4cf1710a
No known key found for this signature in database
GPG key ID: E155910B16E8BD04
3 changed files with 3 additions and 3 deletions

View file

@ -630,6 +630,7 @@ class Routes {
res.json({
hashrates: hashrates,
difficulty: difficulty,
currentHashrate: await bitcoinClient.getNetworkHashPs()
});
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);

View file

@ -5,8 +5,7 @@
<div class="item">
<h5 class="card-title" i18n="mining.hashrate">Hashrate</h5>
<p class="card-text">
{{ hashrates.currentHashrate | amountShortener }}
<span class="symbol">hashes/sec</span>
{{ hashrates.currentHashrate | amountShortener: 1 : 'H/s' }}
</p>
</div>
<div class="item">

View file

@ -125,7 +125,7 @@ export class HashrateChartComponent implements OnInit {
return {
blockCount: parseInt(response.headers.get('x-total-count'), 10),
currentDifficulty: Math.round(data.difficulty[data.difficulty.length - 1].difficulty * 100) / 100,
currentHashrate: data.hashrates[data.hashrates.length - 1].avgHashrate,
currentHashrate: data.currentHashrate
};
}),
retryWhen((errors) => errors.pipe(