[accelerator] success confirmation screen

This commit is contained in:
Mononaut
2024-07-03 18:07:41 +09:00
parent 75ad6a2335
commit db3db49fbc
6 changed files with 53 additions and 12 deletions

View File

@@ -139,12 +139,14 @@
[cashappEnabled]="cashappEligible"
[advancedEnabled]="true"
[tx]="tx"
[accelerating]="isAcceleration"
[eta]="eta"
[miningStats]="miningStats"
[scrollEvent]="scrollIntoAccelPreview"
[showDetails]="showAccelerationDetails"
[noCTA]="true"
(hasDetails)="setHasAccelerationDetails($event)"
(completed)="onAccelerationCompleted()"
class="h-100 w-100"
></app-accelerate-checkout>
</ng-container>

View File

@@ -424,10 +424,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
this.cashappEligible = true;
}
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.accelerationFlowCompleted = true;
}, 2000);
}
}
}
@@ -797,10 +793,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
if (this.isAcceleration) {
if (initialState) {
this.accelerationFlowCompleted = true;
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.accelerationFlowCompleted = true;
}, 2000);
}
}
if (this.isAcceleration) {
@@ -969,6 +961,12 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
return auth !== null;
}
onAccelerationCompleted(): void {
document.location.hash = '';
this.accelerationFlowCompleted = true;
this.forceAccelerationSummary = false;
}
closeAccelerator(): void {
document.location.hash = '';
this.hideAccelerationSummary = true;
@@ -987,7 +985,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.tx
&& !this.replaced
&& !this.isCached
&& !this.tx.acceleration
&& this.acceleratorAvailable
&& this.eligibleForAcceleration
&& (