From 3732406ce8744c03b26239a898e3fcc80c91c4f7 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 9 Jan 2024 00:27:04 +0000 Subject: [PATCH] Sanity checks for mempool visualization deltas --- .../block-overview-graph/block-overview-graph.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts b/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts index ab6985a25..a5f6403ad 100644 --- a/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts +++ b/frontend/src/app/components/block-overview-graph/block-overview-graph.component.ts @@ -206,6 +206,10 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On update(add: TransactionStripped[], remove: string[], change: { txid: string, rate: number | undefined, acc: boolean | undefined }[], direction: string = 'left', resetLayout: boolean = false): void { if (this.scene) { + add = add.filter(tx => !this.scene.txs[tx.txid]); + remove = remove.filter(txid => this.scene.txs[txid]); + change = change.filter(tx => this.scene.txs[tx.txid]); + this.scene.update(add, remove, change, direction, resetLayout); this.start(); this.updateSearchHighlight();