Add timespan switch for pool stats and load more for pool's blocks

This commit is contained in:
nymkappa committed 2022-02-14 14:08:31 +09:00
1 parent e3e3e9f02e
commit 6c8f5c60c7
4 files changed
+91 -52

No files matched your search

+5 -1
View File
@@ -138,6 +138,10 @@ export class ApiService {
}
getPoolBlocks$(poolId: number, fromHeight: number): Observable<BlockExtended[]> {
return this.httpClient.get<BlockExtended[]>(this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/pool-blocks/${poolId}/${fromHeight}`);
if (fromHeight !== undefined) {
return this.httpClient.get<BlockExtended[]>(this.apiBaseUrl + this.apiBasePath +`/api/v1/mining/pool-blocks/${poolId}/${fromHeight}`);
} else {
return this.httpClient.get<BlockExtended[]>(this.apiBaseUrl + this.apiBasePath +`/api/v1/mining/pool-blocks/${poolId}`);
}
}
}