[accelerator] buttons

This commit is contained in:
Mononaut
2024-06-30 04:57:00 +00:00
parent d059c5ca27
commit 110b7a934c
4 changed files with 20 additions and 12 deletions

View File

@@ -421,8 +421,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
this.closeAccelerator();
}, 2000);
}
}
@@ -712,7 +711,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
document.location.hash = '#accelerate';
this.enterpriseService.goal(8);
this.accelerationFlowCompleted = false;
this.showAccelerationSummary = true && this.acceleratorAvailable;
this.showAccelerationSummary = this.acceleratorAvailable;
this.scrollIntoAccelPreview = true;
return false;
}
@@ -796,8 +795,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.showAccelerationSummary = false;
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
this.closeAccelerator();
}, 2000);
}
}
@@ -870,7 +868,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.showCpfpDetails = false;
this.accelerationInfo = null;
this.accelerationEligible = false;
this.accelerationFlowCompleted = false;
this.txInBlockIndex = null;
this.mempoolPosition = null;
this.pool = null;
@@ -887,6 +884,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.stateService.markBlock$.next({});
}
closeAccelerator(): void {
this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
}
roundToOneDecimal(cpfpTx: any): number {
return +(cpfpTx.fee / (cpfpTx.weight / 4)).toFixed(1);
}