Fix pool component hashrate api response handling

This commit is contained in:
nymkappa 2022-04-23 15:50:45 +09:00
parent f3fa5f3e33
commit 0cbcffe96d
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class HashratesRepository {
/**
* Returns a pool hashrate history
*/
public async $getPoolWeeklyHashrate(slug: string): Promise<any[]> {
public async $getPoolWeeklyHashrate(slug: string): Promise<any[]> {
const pool = await PoolsRepository.$getPool(slug);
if (!pool) {
throw new Error(`This mining pool does not exist`);

View File

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