show mempool skeleton while not inSync
This commit is contained in:
parent
de4265a6d1
commit
a6edfcc272
@ -117,7 +117,14 @@ export class MempoolBlocksComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
});
|
});
|
||||||
this.reduceMempoolBlocksToFitScreen(this.mempoolBlocks);
|
this.reduceMempoolBlocksToFitScreen(this.mempoolBlocks);
|
||||||
this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
this.stateService.isTabHidden$.subscribe((tabHidden) => this.tabHidden = tabHidden);
|
||||||
this.loadingBlocks$ = this.stateService.isLoadingWebSocket$;
|
this.loadingBlocks$ = combineLatest([
|
||||||
|
this.stateService.isLoadingWebSocket$,
|
||||||
|
this.stateService.isLoadingMempool$
|
||||||
|
]).pipe(
|
||||||
|
switchMap(([loadingBlocks, loadingMempool]) => {
|
||||||
|
return of(loadingBlocks || loadingMempool);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
this.mempoolBlocks$ = merge(
|
this.mempoolBlocks$ = merge(
|
||||||
of(true),
|
of(true),
|
||||||
|
@ -113,6 +113,7 @@ export class StateService {
|
|||||||
mempoolTxPosition$ = new Subject<{ txid: string, position: MempoolPosition}>();
|
mempoolTxPosition$ = new Subject<{ txid: string, position: MempoolPosition}>();
|
||||||
blockTransactions$ = new Subject<Transaction>();
|
blockTransactions$ = new Subject<Transaction>();
|
||||||
isLoadingWebSocket$ = new ReplaySubject<boolean>(1);
|
isLoadingWebSocket$ = new ReplaySubject<boolean>(1);
|
||||||
|
isLoadingMempool$ = new BehaviorSubject<boolean>(true);
|
||||||
vbytesPerSecond$ = new ReplaySubject<number>(1);
|
vbytesPerSecond$ = new ReplaySubject<number>(1);
|
||||||
previousRetarget$ = new ReplaySubject<number>(1);
|
previousRetarget$ = new ReplaySubject<number>(1);
|
||||||
backendInfo$ = new ReplaySubject<IBackendInfo>(1);
|
backendInfo$ = new ReplaySubject<IBackendInfo>(1);
|
||||||
|
@ -368,6 +368,11 @@ export class WebsocketService {
|
|||||||
|
|
||||||
if (response.loadingIndicators) {
|
if (response.loadingIndicators) {
|
||||||
this.stateService.loadingIndicators$.next(response.loadingIndicators);
|
this.stateService.loadingIndicators$.next(response.loadingIndicators);
|
||||||
|
if (response.loadingIndicators.mempool != null && response.loadingIndicators.mempool < 100) {
|
||||||
|
this.stateService.isLoadingMempool$.next(true);
|
||||||
|
} else {
|
||||||
|
this.stateService.isLoadingMempool$.next(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.mempoolInfo) {
|
if (response.mempoolInfo) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user