From 9ad6b925c80b8821af2306e74ab1838438d2f97a Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 11 Jul 2024 12:27:31 +0000 Subject: [PATCH] [accelerator] remove "coming soon" button state --- .../accelerate-checkout.component.html | 21 +++++++------------ .../accelerate-checkout.component.ts | 8 +++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html index a7f652b7c..76e927f0b 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html @@ -552,22 +552,15 @@ Accelerate to ~{{ x | number : '1.0-0' }} sat/vB - @if (!couldPay && !quoteError && !(estimate?.availablePaymentMethods.bitcoin || estimate?.availablePaymentMethods.balance)) { - - } @else { -
- - @if (quoteError || cantPayReason) { -
- } -
- } + @if (quoteError || cantPayReason) { +
+ } +
diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts index a5e5966d7..49b12bbee 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts @@ -297,6 +297,14 @@ export class AccelerateCheckout implements OnInit, OnDestroy { this.validateChoice(); + if (!this.couldPay) { + this.quoteError = `cannot_accelerate_tx`; + if (this.step === 'summary') { + this.unavailable.emit(true); + } + return; + } + if (this.step === 'checkout' && this.canPayWithBitcoin && !this.loadingBtcpayInvoice) { this.loadingBtcpayInvoice = true; this.requestBTCPayInvoice();