mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Merge pull request #6312 from rodribp/rodribp/fix-eta-changes
Fix: Transaction's ETA changes on reload page
This commit is contained in:
commit
07e811e52a
2 changed files with 12 additions and 1 deletions
3
contributors/rodribp.txt
Normal file
3
contributors/rodribp.txt
Normal file
|
|
@ -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
|
||||
|
|
@ -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);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue