[accelerator] handle estimate api fail

This commit is contained in:
Mononaut 2024-07-05 13:53:03 +00:00
parent b8820684c3
commit 0e122c15e2
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -301,6 +301,11 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
this.estimate = undefined;
this.quoteError = `cannot_accelerate_tx`;
this.estimateSubscription.unsubscribe();
if (this.step === 'summary') {
this.unavailable.emit(true);
} else {
this.accelerateError = 'cannot_accelerate_tx';
}
return of(null);
})
).subscribe();