diff --git a/contributors/rodribp.txt b/contributors/rodribp.txt new file mode 100644 index 000000000..2c466e444 --- /dev/null +++ b/contributors/rodribp.txt @@ -0,0 +1,3 @@ +I hereby accept the terms of the Contributor License Agreement in the CONTRIBUTING.md file of the mempool/mempool git repository as of February 13, 2026. + +Signed: rodribp diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 908583932..77cc373c4 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -13,7 +13,9 @@ import { retry, startWith, repeat, - take + take, + debounceTime, + distinctUntilChanged } from 'rxjs/operators'; import { Transaction } from '@interfaces/electrs.interface'; import { of, merge, Subscription, Observable, Subject, from, throwError, combineLatest, BehaviorSubject, timer } from 'rxjs'; @@ -834,6 +836,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.txChanged$, ]).pipe( map(([position, mempoolBlocks, da, isAccelerated]) => { + if (!this.tx || !position || position.txid !== this.tx.txid) { + return null; + } return this.etaService.calculateETA( this.network, this.tx, @@ -844,6 +849,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { isAccelerated, this.accelerationPositions, ); + }), + distinctUntilChanged((prev: ETA | null, curr: ETA | null) => { + return prev === curr || (prev && curr && prev.time === curr.time && prev.blocks === curr.blocks); }) ); }