diff --git a/frontend/src/app/components/custom-dashboard/custom-dashboard.component.ts b/frontend/src/app/components/custom-dashboard/custom-dashboard.component.ts index b1f79fc04..fbaf7be74 100644 --- a/frontend/src/app/components/custom-dashboard/custom-dashboard.component.ts +++ b/frontend/src/app/components/custom-dashboard/custom-dashboard.component.ts @@ -232,8 +232,10 @@ export class CustomDashboardComponent implements OnInit, OnDestroy, AfterViewIni this.stateService.live2Chart$ .pipe( scan((acc, stats) => { + const now = Date.now() / 1000; + const start = now - (2 * 60 * 60); acc.unshift(stats); - acc = acc.slice(0, 120); + acc = acc.filter(p => p.added >= start); return acc; }, (mempoolStats || [])) ), diff --git a/frontend/src/app/components/television/television.component.ts b/frontend/src/app/components/television/television.component.ts index 3ac8ef648..40f4b7192 100644 --- a/frontend/src/app/components/television/television.component.ts +++ b/frontend/src/app/components/television/television.component.ts @@ -71,7 +71,9 @@ export class TelevisionComponent implements OnInit, OnDestroy { mempoolStats = newStats; } else if (['2h', '24h'].includes(this.fragment)) { mempoolStats.unshift(newStats[0]); - mempoolStats = mempoolStats.slice(0, mempoolStats.length - 1); + const now = Date.now() / 1000; + const start = now - (this.fragment === '2h' ? (2 * 60 * 60) : (24 * 60 * 60) ); + mempoolStats = mempoolStats.filter(p => p.added >= start); } return mempoolStats; })