Only show relevant hashrate in the pool page

This commit is contained in:
nymkappa committed 2022-03-08 20:46:18 +01:00
1 parent 0e2e420a1c
commit dd3f43f7b2
8 files changed
+53 -80

No files matched your search

+3 -3
View File
@@ -58,14 +58,14 @@ class Mining {
/**
* Get all mining pool stats for a pool
*/
public async $getPoolStat(interval: string | null, poolId: number): Promise<object> {
public async $getPoolStat(poolId: number): Promise<object> {
const pool = await PoolsRepository.$getPool(poolId);
if (!pool) {
throw new Error(`This mining pool does not exist`);
}
const blockCount: number = await BlocksRepository.$blockCount(poolId, interval);
const emptyBlocks: EmptyBlocks[] = await BlocksRepository.$getEmptyBlocks(poolId, interval);
const blockCount: number = await BlocksRepository.$blockCount(poolId);
const emptyBlocks: EmptyBlocks[] = await BlocksRepository.$getEmptyBlocks(poolId);
return {
pool: pool,