[accelerator] handle temporarily unavailable state
This commit is contained in:
parent
1a2487b740
commit
0c200e090d
@ -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);
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
|
||||
export const MempoolErrors = {
|
||||
'bad_request': `Your request was not valid. Please try again.`,
|
||||
'internal_server_error': `Something went wrong, please try again later`,
|
||||
'temporarily_unavailable': `Acceleration temporarily unavailable`,
|
||||
'acceleration_duplicated': `This transaction has already been accelerated.`,
|
||||
'acceleration_outbid': `Your fee delta is too low.`,
|
||||
'cannot_accelerate_tx': `Cannot accelerate this transaction.`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user