Also fix stats on custom dashboard & tv view
This commit is contained in:
parent
5b2ecac1f6
commit
cd9e336165
@ -232,8 +232,10 @@ export class CustomDashboardComponent implements OnInit, OnDestroy, AfterViewIni
|
|||||||
this.stateService.live2Chart$
|
this.stateService.live2Chart$
|
||||||
.pipe(
|
.pipe(
|
||||||
scan((acc, stats) => {
|
scan((acc, stats) => {
|
||||||
|
const now = Date.now() / 1000;
|
||||||
|
const start = now - (2 * 60 * 60);
|
||||||
acc.unshift(stats);
|
acc.unshift(stats);
|
||||||
acc = acc.slice(0, 120);
|
acc = acc.filter(p => p.added >= start);
|
||||||
return acc;
|
return acc;
|
||||||
}, (mempoolStats || []))
|
}, (mempoolStats || []))
|
||||||
),
|
),
|
||||||
|
@ -71,7 +71,9 @@ export class TelevisionComponent implements OnInit, OnDestroy {
|
|||||||
mempoolStats = newStats;
|
mempoolStats = newStats;
|
||||||
} else if (['2h', '24h'].includes(this.fragment)) {
|
} else if (['2h', '24h'].includes(this.fragment)) {
|
||||||
mempoolStats.unshift(newStats[0]);
|
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;
|
return mempoolStats;
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user