Merge pull request #5292 from mempool/mononaut/high-fee-accelerations

[accelerator] hide modal for transactions near the top of the mempool
This commit is contained in:
wiz 2024-07-08 22:53:53 +09:00 committed by GitHub
commit 34b5678199
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
txId: string;
txInBlockIndex: number;
mempoolPosition: MempoolPosition;
gotInitialPosition = false;
accelerationPositions: AccelerationPosition[];
isLoadingTx = true;
error: any = undefined;
@ -431,9 +432,13 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
this.cashappEligible = true;
}
if (!this.gotInitialPosition && txPosition.position?.block === 0 && txPosition.position?.vsize < 750_000) {
this.accelerationFlowCompleted = true;
}
}
}
}
this.gotInitialPosition = true;
} else {
this.mempoolPosition = null;
this.accelerationPositions = null;
@ -864,6 +869,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
resetTransaction() {
this.firstLoad = false;
this.gotInitialPosition = false;
this.error = undefined;
this.tx = null;
this.txChanged$.next(true);