Merge pull request #2 from djerfy/fix/worker-total-hash-rate

fix: worker total hash rate (issue #1)
This commit is contained in:
Benjamin Wilson 2023-08-01 15:21:20 -04:00 committed by GitHub
commit 78fba9bada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}