[accelerator] handle temporarily unavailable state
This commit is contained in:
@@ -195,4 +195,5 @@
|
||||
right: 0;
|
||||
font-size: 12px;
|
||||
color: var(--red);
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user