mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-04-02 00:49:06 +02:00
Merge pull request #2 from djerfy/fix/worker-total-hash-rate
fix: worker total hash rate (issue #1)
This commit is contained in:
commit
78fba9bada
@ -136,7 +136,7 @@ export class DashboardComponent {
|
||||
public getTotalHashRate(name: string, workers: any[]) {
|
||||
const workersByName = workers.filter(w => w.name == name);
|
||||
const sum = workersByName.reduce((pre, cur, idx, arr) => {
|
||||
return pre += cur.hashRate;
|
||||
return pre += Math.floor(cur.hashRate);
|
||||
}, 0);
|
||||
return Math.floor(sum);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user