diff --git a/frontend/src/app/components/liquid-reserves-audit/reserves-audit-dashboard/reserves-audit-dashboard.component.ts b/frontend/src/app/components/liquid-reserves-audit/reserves-audit-dashboard/reserves-audit-dashboard.component.ts index e71ff8e80..95de4fdca 100644 --- a/frontend/src/app/components/liquid-reserves-audit/reserves-audit-dashboard/reserves-audit-dashboard.component.ts +++ b/frontend/src/app/components/liquid-reserves-audit/reserves-audit-dashboard/reserves-audit-dashboard.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { SeoService } from '../../../services/seo.service'; import { WebsocketService } from '../../../services/websocket.service'; import { StateService } from '../../../services/state.service'; -import { Observable, concat, delay, filter, share, skip, switchMap, tap } from 'rxjs'; +import { Observable, concat, delay, filter, share, skip, switchMap, tap, throttleTime } from 'rxjs'; import { ApiService } from '../../../services/api.service'; import { AuditStatus, CurrentPegs, FederationAddress, FederationUtxo } from '../../../interfaces/node-api.interface'; @@ -38,6 +38,7 @@ export class ReservesAuditDashboardComponent implements OnInit { this.apiService.federationAuditSynced$().pipe(share()), this.stateService.blocks$.pipe( skip(1), + throttleTime(40000), delay(2000), switchMap(() => this.apiService.federationAuditSynced$()), share() diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 2f97b23a0..d0f111499 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -1,6 +1,6 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core'; import { combineLatest, concat, EMPTY, interval, merge, Observable, of, Subscription } from 'rxjs'; -import { catchError, delay, filter, map, mergeMap, scan, share, skip, startWith, switchMap, tap } from 'rxjs/operators'; +import { catchError, delay, filter, map, mergeMap, scan, share, skip, startWith, switchMap, tap, throttleTime } from 'rxjs/operators'; import { AuditStatus, BlockExtended, CurrentPegs, OptimizedMempoolStats } from '../interfaces/node-api.interface'; import { MempoolInfo, TransactionStripped, ReplacementInfo } from '../interfaces/websocket.interface'; import { ApiService } from '../services/api.service'; @@ -252,6 +252,7 @@ export class DashboardComponent implements OnInit, OnDestroy, AfterViewInit { this.apiService.federationAuditSynced$().pipe(share()), this.stateService.blocks$.pipe( skip(1), + throttleTime(40000), delay(2000), switchMap(() => this.apiService.federationAuditSynced$()), share()