Added copilot's suggestions

This commit is contained in:
rodribp 2026-02-14 12:19:13 -06:00
parent 6a9fc5c004
commit 44becb388e
No known key found for this signature in database
GPG key ID: CC349739DA92EE20

View file

@ -837,6 +837,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
]).pipe(
debounceTime(50),
map(([position, mempoolBlocks, da, isAccelerated]) => {
if (!this.tx) return null;
if (position && position.txid !== this.tx.txid) return null;
return this.etaService.calculateETA(
this.network,
@ -849,7 +850,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.accelerationPositions,
);
}),
distinctUntilChanged()
distinctUntilChanged((prev: ETA | null, curr: ETA | null) => {
if (prev === curr) return true;
if (!prev || !curr) return false;
return prev.time === curr.time && prev.blocks === curr.blocks;
})
);
}