From a8d213840410fb9cb0107e8e5589afe68082fdab Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 26 Jun 2024 11:05:26 +0900 Subject: [PATCH 1/3] Simplify advanced acceleration --- .../accelerate-fee-graph.component.scss | 2 +- .../accelerate-preview.component.html | 143 ++++++++---------- .../accelerate-preview.component.scss | 5 + .../accelerate-preview.component.ts | 1 + .../transaction/transaction.component.html | 4 +- .../transaction/transaction.component.ts | 1 + 6 files changed, 78 insertions(+), 78 deletions(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss index cd48f42fa..396317093 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss +++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss @@ -4,7 +4,7 @@ width: 120px; margin-left: 4em; margin-right: 1.5em; - padding-bottom: 63px; + padding-bottom: 17px; .column { width: 100%; diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index 436dd138e..003156c76 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -32,56 +32,56 @@
You are currently on the waitlist
-
Your transaction
-
-
- - Plus {{ estimate.txSummary.ancestorCount - 1 }} unconfirmed ancestor(s) - - - - - - - - - - - - - - - - - - -
Virtual size
- Size in vbytes of this transaction (including unconfirmed ancestors) -
In-band fees - {{ estimate.txSummary.effectiveFee | number : '1.0-0' }} sats -
- Fees already paid by this transaction (including unconfirmed ancestors) -
+ +
Your transaction
+
+
+ + Plus {{ estimate.txSummary.ancestorCount - 1 }} unconfirmed ancestor(s) + + + + + + + + + + + + + + + + + + +
Virtual size
+ Size in vbytes of this transaction (including unconfirmed ancestors) +
In-band fees + {{ estimate.txSummary.effectiveFee | number : '1.0-0' }} sats +
+ Fees already paid by this transaction (including unconfirmed ancestors) +
+
-
-
+
+
How much faster?
- Your transaction will be prioritized by up to {{ etaInfo.hashratePercentage | number : '1.1-1' }}% of miners. - This will reduce your expected waiting time until the first confirmation to + Your transaction will be prioritized by up to {{ etaInfo.hashratePercentage | number : '1.1-1' }}% of miners. + This will reduce your expected waiting time until the first confirmation to
-
-
How much more are you willing to pay?
+
- Choose the maximum extra transaction fee you're willing to pay.
@@ -97,13 +97,13 @@
-
Acceleration summary
+
Summary
- + - - - - - - - - - - - + + + + + + + + + + - + - + - - - - - - @@ -218,7 +207,11 @@ - + + + @@ -230,7 +223,7 @@ - + - + From 124c0acbe17bb5a147fa4102e380e7e8545b0d11 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 26 Jun 2024 08:03:52 +0000 Subject: [PATCH 3/3] Minor layout tweaks for the acceleration preview --- .../accelerate-fee-graph.component.scss | 1 - .../accelerate-preview.component.html | 53 +++++++------------ .../accelerate-preview.component.scss | 8 ++- 3 files changed, 26 insertions(+), 36 deletions(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss index 396317093..919fdec4a 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss +++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss @@ -4,7 +4,6 @@ width: 120px; margin-left: 4em; margin-right: 1.5em; - padding-bottom: 17px; .column { width: 100%; diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index 742369042..92dc8d0f8 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -98,7 +98,7 @@
Summary
-
+
Next block market rate @@ -123,24 +123,23 @@
Mempool Acceleratorâ„¢ fees
- Accelerator Service Fee - - +{{ estimate.mempoolBaseFee | number }} - - sats - -
Mempool Acceleratorâ„¢ fees
+ Accelerator Service Fee + + +{{ estimate.mempoolBaseFee | number }} + + sats + +
Transaction Size Surcharge @@ -153,13 +152,13 @@
- Estimated acceleration cost + Estimated acceleration cost ~{{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB @@ -171,18 +170,13 @@
- -
- Maximum acceleration cost + Maximum acceleration cost @@ -196,11 +190,6 @@
- -
+
+
@@ -258,6 +251,4 @@

-
- -If your tx is accelerated to ~{{ i | number : '1.0-0' }} sat/vB \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss index 1191d882e..8d9b713a4 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss @@ -118,4 +118,9 @@ .table-background { background-color: var(--bg); +} + +.col.pie { + position: relative; + top: -15px; } \ No newline at end of file diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts index e839459cd..8ec675041 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts @@ -46,6 +46,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges @Input() tx: Transaction; @Input() miningStats: MiningStats; @Input() scrollEvent: boolean; + @Input() showDetails: boolean; math = Math; error = ''; diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 7fef8efc7..43ead974d 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -80,10 +80,12 @@

Accelerate

+ +
- +
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 37c83f008..0348bf50a 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -138,6 +138,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { accelerateCtaType: 'alert' | 'button' = 'button'; acceleratorAvailable: boolean = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === ''; showAccelerationSummary = false; + showAccelerationDetails = false; scrollIntoAccelPreview = false; auditEnabled: boolean = this.stateService.env.AUDIT && this.stateService.env.BASE_MODULE === 'mempool' && this.stateService.env.MINING_DASHBOARD === true; From f7ad45939cee8f5fd006aec04e3cd91ab9052224 Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 26 Jun 2024 15:08:00 +0900 Subject: [PATCH 2/3] Hide surcharge row if zero --- .../accelerate-preview/accelerate-preview.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html index 003156c76..742369042 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html @@ -140,7 +140,7 @@
Transaction Size Surcharge
@@ -128,7 +128,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -186,7 +186,7 @@ @@ -194,7 +194,7 @@ - + - - - - - + - - - - - - - - - @@ -235,15 +229,6 @@
Mempool Acceleratorâ„¢ fees
Accelerator Service Fee
Transaction Size Surcharge
Maximum acceleration cost sats - +
Available balance {{ estimate.userBalance | number }} @@ -207,27 +207,21 @@
-
-
- Sign In -
- Accelerate on mempool.space + +
+ @if (isLoggedIn()) { + @if (user && estimate.hasAccess) { + + } + } @else if (stateService.isMempoolSpaceBuild) { + Sign In + } @else { + Accelerate on mempool.space + } +
- -
-
-
- -
-
-
-
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss index 8d9b713a4..7194a4782 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss @@ -72,11 +72,17 @@ padding-top: 0.75rem; } } - &.group-last { + &.group-last, &:last-child { td { padding-bottom: 0.75rem; } } + &.dashed-top { + border-top: 1px dashed grey; + } + &.dashed-bottom { + border-bottom: 1px dashed grey + } } td { &:first-child {