[accelerator] handle temporarily unavailable state

This commit is contained in:
Mononaut
2024-07-06 10:48:37 +00:00
parent 1a2487b740
commit 0c200e090d
3 changed files with 6 additions and 0 deletions

View File

@@ -195,4 +195,5 @@
right: 0;
font-size: 12px;
color: var(--red);
white-space: nowrap;
}

View File

@@ -23,6 +23,7 @@ export type AccelerationEstimate = {
vsizeFee: number;
pools: number[];
availablePaymentMethods: {[method: string]: {min: number, max: number}};
unavailable?: boolean;
}
export type TxSummary = {
txid: string; // txid of the current transaction
@@ -259,6 +260,9 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
this.quoteError = `not_enough_balance`;
}
}
if (this.estimate.unavailable) {
this.quoteError = `temporarily_unavailable`;
}
this.hasAncestors = this.estimate.txSummary.ancestorCount > 1;
this.etaInfo$ = this.etaService.getProjectedEtaObservable(this.estimate, this.miningStats);