[accelerator] add acceleration paid screen, fix end state

This commit is contained in:
Mononaut
2024-06-29 06:06:11 +00:00
parent 48bdae4e78
commit d62300ccff
6 changed files with 146 additions and 107 deletions

View File

@@ -767,8 +767,14 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
setIsAccelerated(initialState: boolean = false) {
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
if (this.isAcceleration && initialState) {
this.showAccelerationSummary = false;
if (this.isAcceleration) {
if (initialState) {
this.showAccelerationSummary = false;
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.showAccelerationSummary = false;
}, 2000);
}
}
if (this.isAcceleration) {
// this immediately returns cached stats if we fetched them recently