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 a0f84e226..b727d3af2 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html @@ -283,11 +283,9 @@
-
-
- -
@@ -338,18 +336,20 @@
- @if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp)) { -
- +
+
+

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

- } @else { -
-
-

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

+ @if (canPayWithBalance || !(canPayWithBitcoin || canPayWithCashapp)) { +
+
+

Your account will be debited no more than {{ cost | number }} sats

+
+ +
+
+ } @else {
@if (canPayWithBitcoin) {
@@ -376,8 +376,8 @@
}
-
- } + } +
@@ -487,12 +487,12 @@
- + @if (isLoggedIn() || canPayWithBitcoin || canPayWithCashapp) { - @@ -502,4 +502,18 @@ Coming soon } + + + + @if (isLoggedIn()) { + + } @else { + + } \ No newline at end of file diff --git a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss index 5cfd153bd..5b302b9ad 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.scss @@ -189,22 +189,3 @@ flex-direction: column; } } - -@keyframes box-shake { - 0% { transform: rotate(0deg); } - 10% { transform: rotate(-8deg); } - 20% { transform: rotate(8deg); } - 30% { transform: rotate(-8deg); } - 40% { transform: rotate(8deg); } - 50% { transform: rotate(-8deg); } - 60% { transform: rotate(8deg); } - 70% { transform: rotate(-8deg); } - 80% { transform: rotate(8deg); } - 90% { transform: rotate(-8deg); } - 100% { transform: rotate(0deg); } -} - -.error-shake { - box-shadow: 0 0 10px 2px var(--danger); - animation: box-shake 1.5s ease-in-out; -} \ No newline at end of file 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 8c0d35dd9..5db585381 100644 --- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts +++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts @@ -62,8 +62,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy { @Output() changeMode = new EventEmitter(); calculating = true; - armed = false; - misfire = false; error = ''; math = Math; isMobile: boolean = window.innerWidth <= 767.98; @@ -150,7 +148,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy { moveToStep(step: CheckoutStep) { this._step = step; - this.misfire = false; if (!this.estimate && ['quote', 'summary', 'checkout'].includes(this.step)) { this.fetchEstimate(); } @@ -265,28 +262,13 @@ export class AccelerateCheckout implements OnInit, OnDestroy { } } - /** - * Advanced mode acceleration button clicked - */ - accelerate(): void { - if (this.canPay && !this.calculating) { - if ((!this.armed && this.step === 'summary')) { - this.misfire = true; - } else { - if (this.isLoggedIn()) { - this.accelerateWithMempoolAccount(); - } else { - this.armed = true; - this.moveToStep('checkout'); - } - } - } - } - /** * Account-based acceleration request */ accelerateWithMempoolAccount(): void { + if (!this.canPay || this.calculating) { + return; + } if (this.accelerationSubscription) { this.accelerationSubscription.unsubscribe(); }