From 0803fed0f4d4de06f27ec700f8467a3fad686104 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Sat, 23 Apr 2022 15:50:45 +0900 Subject: [PATCH] Fix pool component hashrate api response handling --- backend/src/repositories/HashratesRepository.ts | 2 +- frontend/src/app/components/pool/pool.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/repositories/HashratesRepository.ts b/backend/src/repositories/HashratesRepository.ts index 8388b9122..338948427 100644 --- a/backend/src/repositories/HashratesRepository.ts +++ b/backend/src/repositories/HashratesRepository.ts @@ -102,7 +102,7 @@ class HashratesRepository { /** * Returns a pool hashrate history */ - public async $getPoolWeeklyHashrate(slug: string): Promise { + public async $getPoolWeeklyHashrate(slug: string): Promise { const pool = await PoolsRepository.$getPool(slug); if (!pool) { throw new Error(`This mining pool does not exist`); diff --git a/frontend/src/app/components/pool/pool.component.ts b/frontend/src/app/components/pool/pool.component.ts index 4d41c2437..9d644121a 100644 --- a/frontend/src/app/components/pool/pool.component.ts +++ b/frontend/src/app/components/pool/pool.component.ts @@ -56,7 +56,7 @@ export class PoolComponent implements OnInit { .pipe( switchMap((data) => { this.isLoading = false; - this.prepareChartOptions(data.hashrates.map(val => [val.timestamp * 1000, val.avgHashrate])); + this.prepareChartOptions(data.map(val => [val.timestamp * 1000, val.avgHashrate])); return [slug]; }), );