mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
fix pool info
This commit is contained in:
@@ -19,9 +19,9 @@ export class UserAgentReportView {
|
|||||||
@ViewColumn()
|
@ViewColumn()
|
||||||
userAgent: string;
|
userAgent: string;
|
||||||
@ViewColumn()
|
@ViewColumn()
|
||||||
count: number;
|
count: string;
|
||||||
@ViewColumn()
|
@ViewColumn()
|
||||||
bestDifficulty: number;
|
bestDifficulty: number;
|
||||||
@ViewColumn()
|
@ViewColumn()
|
||||||
totalHashRate: number;
|
totalHashRate: string;
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,8 @@ export class AppController {
|
|||||||
|
|
||||||
|
|
||||||
const userAgents = await this.userAgentReportService.getReport();
|
const userAgents = await this.userAgentReportService.getReport();
|
||||||
const totalHashRate = userAgents.reduce((acc, userAgent) => acc + userAgent.totalHashRate, 0);
|
const totalHashRate = userAgents.reduce((acc, userAgent) => acc + parseFloat(userAgent.totalHashRate), 0);
|
||||||
const totalMiners = userAgents.reduce((acc, userAgent) => acc + userAgent.count, 0);
|
const totalMiners = userAgents.reduce((acc, userAgent) => acc + parseFloat(userAgent.count), 0);
|
||||||
const blockHeight = (await firstValueFrom(this.bitcoinRpcService.newBlock$)).blocks;
|
const blockHeight = (await firstValueFrom(this.bitcoinRpcService.newBlock$)).blocks;
|
||||||
const blocksFound = await this.blocksService.getFoundBlocks();
|
const blocksFound = await this.blocksService.getFoundBlocks();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user