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 a77347cdf..f23b808de 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html @@ -32,8 +32,8 @@
-
-
You are currently on the waitlist
+
+
You are currently on the waitlist
@if (showDetails) { @@ -177,7 +177,7 @@ - + @if (isLoggedIn()) { Maximum acceleration cost @@ -219,10 +219,17 @@
- + @if (isLoggedIn()) { + + } @else { + + }
@@ -248,7 +255,7 @@
-
+
@@ -328,14 +335,14 @@
@if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp)) { -
-
} @else { -
+

Payment to mempool.space for acceleration of txid {{ tx.txid.substr(0, 10) }}..{{ tx.txid.substr(-10) }}

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 a580360a5..7de6a4a04 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts @@ -232,6 +232,10 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } this.cost = this.userBid + this.estimate.mempoolBaseFee + this.estimate.vsizeFee; + if (!this.canPay && this.advancedEnabled && this.step !== 'quote') { + this.moveToStep('quote'); + } + if (this.step === 'checkout' && this.canPayWithBitcoin && !this.loadingBtcpayInvoice) { this.loadingBtcpayInvoice = true; this.requestBTCPayInvoice(); @@ -266,14 +270,16 @@ export class AccelerateCheckout implements OnInit, OnDestroy { * Advanced mode acceleration button clicked */ accelerate(): void { - if (this.isLoggedIn()) { - if (this.step !== 'summary') { - this.moveToStep('summary'); + if (this.canPay) { + if (this.isLoggedIn()) { + if (this.step !== 'summary') { + this.moveToStep('summary'); + } else { + this.accelerateWithMempoolAccount(); + } } else { - this.accelerateWithMempoolAccount(); + this.moveToStep('checkout'); } - } else { - this.moveToStep('checkout'); } } @@ -471,11 +477,15 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } get canPayWithCashapp() { - return this.cashappEnabled && this.estimate?.availablePaymentMethods?.includes('bitcoin'); + return this.cashappEnabled && this.estimate?.availablePaymentMethods?.includes('cashapp'); } get canPayWithBalance() { - return this.isLoggedIn() && this.estimate?.availablePaymentMethods?.includes('balance'); + return this.isLoggedIn() && this.estimate?.availablePaymentMethods?.includes('balance') && this.estimate?.hasAccess; + } + + get canPay() { + return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp; } get showSummary() {