Date: Sat, 29 Jun 2024 07:46:24 +0000
Subject: [PATCH 19/45] [accelerator] fix other missing button
---
.../accelerate-checkout/accelerate-checkout.component.html | 4 ++--
1 file changed, 2 insertions(+), 2 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 6dccfc060..0cd278f25 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
@@ -219,12 +219,12 @@
- @if (isLoggedIn()) {
+ @if (isLoggedIn() || canPayWithBitcoin || canPayWithCashapp) {
Accelerate
- } @else if (!canPayWithBitcoin && !canPayWithCashapp) {
+ } @else {
Coming soon
From 10671311203c4a1597204e438c4b4e783e082961 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sat, 29 Jun 2024 16:47:38 +0900
Subject: [PATCH 20/45] [btcpay] fix displayed amount
---
.../bitcoin-invoice/bitcoin-invoice.component.html | 14 +++++++-------
.../bitcoin-invoice/bitcoin-invoice.component.ts | 4 +---
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.html b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.html
index 1731a0e43..4e158e3e4 100644
--- a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.html
+++ b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.html
@@ -33,8 +33,8 @@
@@ -45,7 +45,7 @@
@if (!minimal) {
- {{ invoice.amount }} BTC
+ {{ invoice.btcDue | number: '1.0-8' }} BTC
}
@@ -66,7 +66,7 @@
@if (!minimal) {
- {{ invoice.amount * 100_000_000 }} sats
+ {{ invoice.btcDue * 100_000_000 | number: '1.0-0' }} sats
}
@@ -74,8 +74,8 @@
@@ -86,7 +86,7 @@
@if (!minimal) {
- {{ invoice.amount }} BTC
+ {{ invoice.btcDue | number: '1.0-8' }} BTC
}
diff --git a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts
index 6f2d4b36c..395e1e41d 100644
--- a/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts
+++ b/frontend/src/app/components/bitcoin-invoice/bitcoin-invoice.component.ts
@@ -65,9 +65,7 @@ export class BitcoinInvoiceComponent implements OnInit, OnDestroy {
this.paymentStatusSubscription = this.apiService.retreiveInvoice$(invoiceId).pipe(
tap((invoice: any) => {
this.invoice = invoice;
- this.invoice.amount = invoice.btcDue ?? (invoice.cryptoInfo.length ? parseFloat(invoice.cryptoInfo[0].totalDue) : 0) ?? 0;
-
- if (this.invoice.amount > 0) {
+ if (this.invoice.btcDue > 0) {
this.paymentStatus = 2;
} else {
this.paymentStatus = 4;
From 776404dbdea891a65b69a7296e06898e838052ec Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sat, 29 Jun 2024 09:17:08 +0000
Subject: [PATCH 21/45] [accelerator] Pro for everyone
---
.../accelerate-checkout.component.html | 89 +++++++++++--------
.../accelerate-checkout.component.ts | 19 +---
.../components/tracker/tracker.component.html | 2 +-
.../components/tracker/tracker.component.ts | 11 ++-
.../transaction/transaction.component.html | 5 +-
.../transaction/transaction.component.ts | 30 +++++--
6 files changed, 91 insertions(+), 65 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 0cd278f25..11ecd2b7e 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
@@ -107,25 +107,49 @@
-
- Next block market rate
-
- {{ estimate.targetFeeRate | number : '1.0-0' }}
-
- sat/vB
-
-
-
- Estimated extra fee required
-
-
- {{ math.max(0, estimate.nextBlockFee - estimate.txSummary.effectiveFee) | number }}
-
-
- sats
-
-
-
+ @if (isLoggedIn()) {
+
+ Next block market rate
+
+ {{ estimate.targetFeeRate | number : '1.0-0' }}
+
+ sat/vB
+
+
+
+ Estimated extra fee required
+
+
+ {{ math.max(0, estimate.nextBlockFee - estimate.txSummary.effectiveFee) | number }}
+
+
+ sats
+
+
+
+ }
+ @else {
+
+
+ Target rate
+
+ {{ maxRateOptions[selectFeeRateIndex].rate | number : '1.0-0' }}
+
+ sat/vB
+
+
+
+ Extra fee required
+
+
+ {{ maxRateOptions[selectFeeRateIndex].fee | number }}
+
+
+ sats
+
+
+
+ }
@@ -219,17 +243,10 @@
- @if (isLoggedIn() || canPayWithBitcoin || canPayWithCashapp) {
-
-
- Accelerate
-
- } @else {
-
-
- Coming soon
-
- }
+
+
+ Continue
+
@@ -280,7 +297,7 @@
- @if (showSummary) {
-
-
- Go Back
-
+
} @else if (step === 'cashapp') {
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 7de6a4a04..6c37663d0 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
@@ -55,7 +55,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
@Input() scrollEvent: boolean;
@Input() cashappEnabled: boolean = true;
@Input() advancedEnabled: boolean = false;
- @Input() forceSummary: boolean = false;
@Input() forceMobile: boolean = false;
@Output() changeMode = new EventEmitter
();
@@ -122,10 +121,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
this.moveToStep('processing');
this.insertSquare();
this.setupSquare();
- } else if (this.isLoggedIn() || this.forceSummary) {
- this.moveToStep('summary');
} else {
- this.moveToStep('checkout');
+ this.moveToStep('summary');
}
this.servicesApiService.setupSquare$().subscribe(ids => {
@@ -232,10 +229,6 @@ 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();
@@ -272,11 +265,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
accelerate(): void {
if (this.canPay) {
if (this.isLoggedIn()) {
- if (this.step !== 'summary') {
- this.moveToStep('summary');
- } else {
- this.accelerateWithMempoolAccount();
- }
+ this.accelerateWithMempoolAccount();
} else {
this.moveToStep('checkout');
}
@@ -488,10 +477,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp;
}
- get showSummary() {
- return this.canPayWithBalance || this.forceSummary;
- }
-
@HostListener('window:resize', ['$event'])
onResize(): void {
this.isMobile = window.innerWidth <= 767.98;
diff --git a/frontend/src/app/components/tracker/tracker.component.html b/frontend/src/app/components/tracker/tracker.component.html
index f65e1a204..5199897fc 100644
--- a/frontend/src/app/components/tracker/tracker.component.html
+++ b/frontend/src/app/components/tracker/tracker.component.html
@@ -122,7 +122,7 @@
} @else if (showAccelerationSummary && !accelerationFlowCompleted) {
-
+
} @else {
@if (tx?.acceleration && !tx.status?.confirmed) {
diff --git a/frontend/src/app/components/tracker/tracker.component.ts b/frontend/src/app/components/tracker/tracker.component.ts
index b9c2b5ae7..88a929bd7 100644
--- a/frontend/src/app/components/tracker/tracker.component.ts
+++ b/frontend/src/app/components/tracker/tracker.component.ts
@@ -151,6 +151,10 @@ export class TrackerComponent implements OnInit, OnDestroy {
this.acceleratorAvailable = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === '';
+ this.miningService.getMiningStats('1w').subscribe(stats => {
+ this.miningStats = stats;
+ });
+
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('cash_request_id')) {
this.showAccelerationSummary = true;
@@ -382,7 +386,12 @@ export class TrackerComponent implements OnInit, OnDestroy {
}
if (!this.mempoolPosition.accelerated) {
- this.showAccelerationSummary = true;
+ if (!this.showAccelerationSummary) {
+ this.showAccelerationSummary = true;
+ this.miningService.getMiningStats('1w').subscribe(stats => {
+ this.miningStats = stats;
+ });
+ }
if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
this.accelerationEligible = true;
}
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 0e67887dc..58322a72d 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -547,11 +547,8 @@
} @else if (network === 'liquid' || network === 'liquidtestnet') {
} @else {
-
+
- @if (!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button') {
- Accelerate
- }
}
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index 1e37ca3fc..7b12b3c7b 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -170,6 +170,15 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
this.enterpriseService.page();
+ const urlParams = new URLSearchParams(window.location.search);
+ if (urlParams.get('cash_request_id')) {
+ this.showAccelerationSummary = true;
+ }
+
+ this.miningService.getMiningStats('1w').subscribe(stats => {
+ this.miningStats = stats;
+ });
+
this.websocketService.want(['blocks', 'mempool-blocks']);
this.stateService.networkChanged$.subscribe(
(network) => {
@@ -398,7 +407,22 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
} else if ((this.tx?.acceleration && txPosition.position.acceleratedBy)) {
this.tx.acceleratedBy = txPosition.position.acceleratedBy;
}
- this.accelerationEligible = txPosition?.position?.block > 0 && this.tx?.weight < 4000;
+
+ if (!this.mempoolPosition.accelerated) {
+ if (!this.showAccelerationSummary) {
+ this.showAccelerationSummary = true;
+ this.miningService.getMiningStats('1w').subscribe(stats => {
+ this.miningStats = stats;
+ });
+ }
+ if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
+ this.accelerationEligible = true;
+ }
+ } else if (this.showAccelerationSummary) {
+ setTimeout(() => {
+ this.showAccelerationSummary = false;
+ }, 2000);
+ }
}
} else {
this.mempoolPosition = null;
@@ -683,10 +707,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
return;
}
- this.miningService.getMiningStats('1w').subscribe(stats => {
- this.miningStats = stats;
- });
-
document.location.hash = '#accelerate';
this.enterpriseService.goal(8);
this.showAccelerationSummary = true && this.acceleratorAvailable;
From c5fc47683470d6b194df22e1d44a00ab6f46bd2f Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sat, 29 Jun 2024 09:21:39 +0000
Subject: [PATCH 22/45] [accelerator] no autoscroll to checkout
---
.../accelerate-checkout.component.ts | 28 -------------------
.../components/tracker/tracker.component.html | 2 +-
.../transaction/transaction.component.html | 2 +-
3 files changed, 2 insertions(+), 30 deletions(-)
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 6c37663d0..30ce7a606 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
@@ -52,7 +52,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
@Input() tx: Transaction;
@Input() miningStats: MiningStats;
@Input() eta: ETA;
- @Input() scrollEvent: boolean;
@Input() cashappEnabled: boolean = true;
@Input() advancedEnabled: boolean = false;
@Input() forceMobile: boolean = false;
@@ -139,12 +138,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
}
- ngOnChanges(changes: SimpleChanges): void {
- if (changes.scrollEvent) {
- this.scrollToElement('acceleratePreviewAnchor', 'start');
- }
- }
-
moveToStep(step: CheckoutStep) {
this._step = step;
if (!this.estimate && ['quote', 'summary', 'checkout'].includes(this.step)) {
@@ -160,26 +153,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
}
- /**
- * Scroll to element id with or without setTimeout
- */
- scrollToElementWithTimeout(id: string, position: ScrollLogicalPosition, timeout: number = 1000): void {
- setTimeout(() => {
- this.scrollToElement(id, position);
- }, timeout);
- }
- scrollToElement(id: string, position: ScrollLogicalPosition) {
- const acceleratePreviewAnchor = document.getElementById(id);
- if (acceleratePreviewAnchor) {
- this.cd.markForCheck();
- acceleratePreviewAnchor.scrollIntoView({
- behavior: 'smooth',
- inline: position,
- block: position,
- });
- }
- }
-
/**
* Accelerator
*/
@@ -437,7 +410,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
next: (response) => {
this.invoice = response;
this.cd.markForCheck();
- this.scrollToElementWithTimeout('acceleratePreviewAnchor', 'start', 500);
},
error: (response) => {
console.log(response);
diff --git a/frontend/src/app/components/tracker/tracker.component.html b/frontend/src/app/components/tracker/tracker.component.html
index 5199897fc..417038539 100644
--- a/frontend/src/app/components/tracker/tracker.component.html
+++ b/frontend/src/app/components/tracker/tracker.component.html
@@ -122,7 +122,7 @@
} @else if (showAccelerationSummary && !accelerationFlowCompleted) {
-
+
} @else {
@if (tx?.acceleration && !tx.status?.confirmed) {
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 58322a72d..1c83bba40 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -84,7 +84,7 @@
-
+
Urgent transaction? Get it confirmed faster.
From f68c8cc621cafa4e474e2e3ed0d990a48e093625 Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sun, 30 Jun 2024 01:46:11 +0000
Subject: [PATCH 23/45] [accelerator] restore scroll events, remove eta button
---
.../accelerate-checkout.component.ts | 28 +++++++++++++++++++
.../components/tracker/tracker.component.html | 6 ++--
.../components/tracker/tracker.component.ts | 2 +-
.../transaction/transaction.component.html | 6 ++--
.../transaction/transaction.component.ts | 2 +-
5 files changed, 36 insertions(+), 8 deletions(-)
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 30ce7a606..6a20f6ff7 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
@@ -52,6 +52,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
@Input() tx: Transaction;
@Input() miningStats: MiningStats;
@Input() eta: ETA;
+ @Input() scrollEvent: boolean;
@Input() cashappEnabled: boolean = true;
@Input() advancedEnabled: boolean = false;
@Input() forceMobile: boolean = false;
@@ -138,6 +139,12 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
}
+ ngOnChanges(changes: SimpleChanges): void {
+ if (changes.scrollEvent && this.scrollEvent) {
+ this.scrollToElement('acceleratePreviewAnchor', 'start');
+ }
+ }
+
moveToStep(step: CheckoutStep) {
this._step = step;
if (!this.estimate && ['quote', 'summary', 'checkout'].includes(this.step)) {
@@ -153,6 +160,26 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
}
+ /**
+ * Scroll to element id with or without setTimeout
+ */
+ scrollToElementWithTimeout(id: string, position: ScrollLogicalPosition, timeout: number = 1000): void {
+ setTimeout(() => {
+ this.scrollToElement(id, position);
+ }, timeout);
+ }
+ scrollToElement(id: string, position: ScrollLogicalPosition) {
+ const acceleratePreviewAnchor = document.getElementById(id);
+ if (acceleratePreviewAnchor) {
+ this.cd.markForCheck();
+ acceleratePreviewAnchor.scrollIntoView({
+ behavior: 'smooth',
+ inline: position,
+ block: position,
+ });
+ }
+ }
+
/**
* Accelerator
*/
@@ -410,6 +437,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
next: (response) => {
this.invoice = response;
this.cd.markForCheck();
+ this.scrollToElementWithTimeout('acceleratePreviewAnchor', 'start', 500);
},
error: (response) => {
console.log(response);
diff --git a/frontend/src/app/components/tracker/tracker.component.html b/frontend/src/app/components/tracker/tracker.component.html
index 417038539..6bb0950b5 100644
--- a/frontend/src/app/components/tracker/tracker.component.html
+++ b/frontend/src/app/components/tracker/tracker.component.html
@@ -75,9 +75,9 @@
} @else {
}
- @if (!showAccelerationSummary && isMobile && !tx.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) {
+
@@ -122,7 +122,7 @@
} @else if (showAccelerationSummary && !accelerationFlowCompleted) {
-
+
} @else {
@if (tx?.acceleration && !tx.status?.confirmed) {
diff --git a/frontend/src/app/components/tracker/tracker.component.ts b/frontend/src/app/components/tracker/tracker.component.ts
index 88a929bd7..397f98805 100644
--- a/frontend/src/app/components/tracker/tracker.component.ts
+++ b/frontend/src/app/components/tracker/tracker.component.ts
@@ -743,7 +743,7 @@ export class TrackerComponent implements OnInit, OnDestroy {
}
this.enterpriseService.goal(8);
this.showAccelerationSummary = true && this.acceleratorAvailable;
- this.scrollIntoAccelPreview = !this.scrollIntoAccelPreview;
+ this.scrollIntoAccelPreview = true;
return false;
}
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 1c83bba40..5a2c1510a 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -84,7 +84,7 @@
-
+
Urgent transaction? Get it confirmed faster.
@@ -540,9 +540,9 @@
@if (eta.blocks >= 7) {
In several hours (or more)
- @if (!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button') {
+
} @else if (network === 'liquid' || network === 'liquidtestnet') {
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index 7b12b3c7b..74f49c69b 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -710,7 +710,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
document.location.hash = '#accelerate';
this.enterpriseService.goal(8);
this.showAccelerationSummary = true && this.acceleratorAvailable;
- this.scrollIntoAccelPreview = !this.scrollIntoAccelPreview;
+ this.scrollIntoAccelPreview = true;
return false;
}
From 2798b43913e1cf056a3b1bd7cfa581bc786ab127 Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sun, 30 Jun 2024 02:40:58 +0000
Subject: [PATCH 24/45] [accelerator] adjust h1 labels
---
.../src/app/components/transaction/transaction.component.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 5a2c1510a..4a56f2c99 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -78,14 +78,14 @@
-
Accelerate
+ Transaction stuck?
- Urgent transaction? Get it confirmed faster.
+ Mempool Accelerator™ fixes this.
From bf37affe47be152cb6de536e700a9e5a3bd48a3d Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sun, 30 Jun 2024 03:20:33 +0000
Subject: [PATCH 25/45] [accelerator] fiat limits
---
.../accelerate-checkout.component.html | 2 +-
.../accelerate-checkout/accelerate-checkout.component.ts | 2 +-
.../src/app/components/tracker/tracker.component.html | 2 +-
frontend/src/app/components/tracker/tracker.component.ts | 7 +++++--
.../components/transaction/transaction.component.html | 4 ++--
.../app/components/transaction/transaction.component.ts | 9 ++++++++-
6 files changed, 18 insertions(+), 8 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 11ecd2b7e..2ffb94294 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
@@ -391,7 +391,7 @@
}
}
- @if (cashappEnabled) {
+ @if (canPayWithCashapp) {
Pay with
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 6a20f6ff7..c69da8524 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.ts
@@ -466,7 +466,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
get canPayWithCashapp() {
- return this.cashappEnabled && this.estimate?.availablePaymentMethods?.includes('cashapp');
+ return this.cashappEnabled && this.estimate?.availablePaymentMethods?.includes('cashapp') && this.cost < 400000;
}
get canPayWithBalance() {
diff --git a/frontend/src/app/components/tracker/tracker.component.html b/frontend/src/app/components/tracker/tracker.component.html
index 6bb0950b5..a0f242d46 100644
--- a/frontend/src/app/components/tracker/tracker.component.html
+++ b/frontend/src/app/components/tracker/tracker.component.html
@@ -120,7 +120,7 @@
- } @else if (showAccelerationSummary && !accelerationFlowCompleted) {
+ } @else if (showAccelerationSummary) {
diff --git a/frontend/src/app/components/tracker/tracker.component.ts b/frontend/src/app/components/tracker/tracker.component.ts
index 397f98805..57eecee16 100644
--- a/frontend/src/app/components/tracker/tracker.component.ts
+++ b/frontend/src/app/components/tracker/tracker.component.ts
@@ -386,18 +386,19 @@ export class TrackerComponent implements OnInit, OnDestroy {
}
if (!this.mempoolPosition.accelerated) {
- if (!this.showAccelerationSummary) {
+ if (!this.accelerationFlowCompleted && !this.showAccelerationSummary && this.mempoolPosition.block > 0) {
this.showAccelerationSummary = true;
this.miningService.getMiningStats('1w').subscribe(stats => {
this.miningStats = stats;
});
}
- if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
+ if (txPosition.position?.block > 0) {
this.accelerationEligible = true;
}
} else if (this.showAccelerationSummary) {
setTimeout(() => {
this.accelerationFlowCompleted = true;
+ this.showAccelerationSummary = false;
}, 2000);
}
}
@@ -742,6 +743,7 @@ export class TrackerComponent implements OnInit, OnDestroy {
return;
}
this.enterpriseService.goal(8);
+ this.accelerationFlowCompleted = false;
this.showAccelerationSummary = true && this.acceleratorAvailable;
this.scrollIntoAccelPreview = true;
return false;
@@ -777,6 +779,7 @@ export class TrackerComponent implements OnInit, OnDestroy {
this.auditStatus = null;
this.accelerationPositions = null;
this.accelerationEligible = false;
+ this.accelerationFlowCompleted = false;
this.trackerStage = 'waiting';
document.body.scrollTo(0, 0);
this.leaveTransaction();
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 4a56f2c99..eecae86f7 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -540,9 +540,9 @@
@if (eta.blocks >= 7) {
In several hours (or more)
-
+ }
} @else if (network === 'liquid' || network === 'liquidtestnet') {
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index 74f49c69b..0f86701ff 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -139,6 +139,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
acceleratorAvailable: boolean = this.stateService.env.ACCELERATOR && this.stateService.network === '';
showAccelerationSummary = false;
showAccelerationDetails = false;
+ accelerationFlowCompleted = false;
scrollIntoAccelPreview = false;
accelerationEligible = false;
auditEnabled: boolean = this.stateService.env.AUDIT && this.stateService.env.BASE_MODULE === 'mempool' && this.stateService.env.MINING_DASHBOARD === true;
@@ -409,7 +410,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
if (!this.mempoolPosition.accelerated) {
- if (!this.showAccelerationSummary) {
+ if (!this.accelerationFlowCompleted && !this.showAccelerationSummary) {
this.showAccelerationSummary = true;
this.miningService.getMiningStats('1w').subscribe(stats => {
this.miningStats = stats;
@@ -420,6 +421,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
} else if (this.showAccelerationSummary) {
setTimeout(() => {
+ this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
}, 2000);
}
@@ -709,6 +711,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
document.location.hash = '#accelerate';
this.enterpriseService.goal(8);
+ this.accelerationFlowCompleted = false;
this.showAccelerationSummary = true && this.acceleratorAvailable;
this.scrollIntoAccelPreview = true;
return false;
@@ -789,9 +792,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
if (this.isAcceleration) {
if (initialState) {
+ this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
} else if (this.showAccelerationSummary) {
setTimeout(() => {
+ this.accelerationFlowCompleted = true;
this.showAccelerationSummary = false;
}, 2000);
}
@@ -864,6 +869,8 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.filters = [];
this.showCpfpDetails = false;
this.accelerationInfo = null;
+ this.accelerationEligible = false;
+ this.accelerationFlowCompleted = false;
this.txInBlockIndex = null;
this.mempoolPosition = null;
this.pool = null;
From d059c5ca27c23f0d892fe798d281ccb4c7aed845 Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Sun, 30 Jun 2024 03:43:28 +0000
Subject: [PATCH 26/45] [accelerator] slim summary screen
---
.../accelerate-checkout.component.html | 59 +++++++------------
.../accelerate-checkout.component.scss | 13 ++++
.../accelerate-checkout.component.ts | 10 +---
.../transaction/transaction.component.html | 14 ++++-
4 files changed, 47 insertions(+), 49 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 2ffb94294..73b209593 100644
--- a/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
+++ b/frontend/src/app/components/accelerate-checkout/accelerate-checkout.component.html
@@ -266,36 +266,23 @@
@else if (step === 'summary') {
-
-
-
Accelerate your Bitcoin transaction?
+ @if (!noCTA) {
+
+
+
Accelerate your Bitcoin transaction?
+
-
+ }
You are currently on the waitlist for Mempool Accelerator™