Loading indicator service indicating mempool sync status.

This commit is contained in:
softsimon
2021-01-05 18:57:06 +07:00
parent f46728080d
commit 632c243b34
10 changed files with 72 additions and 3 deletions

View File

@@ -13,6 +13,8 @@ interface MarkBlockState {
txFeePerVSize?: number;
}
export interface ILoadingIndicators { [name: string]: number; }
export interface Env {
TESTNET_ENABLED: boolean;
LIQUID_ENABLED: boolean;
@@ -63,6 +65,7 @@ export class StateService {
lastDifficultyAdjustment$ = new ReplaySubject<number>(1);
gitCommit$ = new ReplaySubject<string>(1);
donationConfirmed$ = new Subject();
loadingIndicators$ = new ReplaySubject<ILoadingIndicators>(1);
live2Chart$ = new Subject<OptimizedMempoolStats>();

View File

@@ -270,6 +270,10 @@ export class WebsocketService {
this.stateService.live2Chart$.next(response['live-2h-chart']);
}
if (response.loadingIndicators) {
this.stateService.loadingIndicators$.next(response.loadingIndicators);
}
if (response.mempoolInfo) {
this.stateService.mempoolInfo$.next(response.mempoolInfo);
}