From 17720b98c1ebdb25aa83593824ad286986058963 Mon Sep 17 00:00:00 2001 From: natsoni Date: Thu, 11 Jul 2024 20:38:38 +0900 Subject: [PATCH 1/3] Avoid briefly displaying wrong accelerated fee rate on tx load --- .../app/components/transaction/transaction.component.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 22916b242..3e7c67359 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -640,7 +640,11 @@
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) { - + @if (!tx.effectiveFeePerVsize) { + + } @else { + + } } @else { } From 06b696f0bb6f4683cc7310418ea8ed447168f225 Mon Sep 17 00:00:00 2001 From: natsoni Date: Thu, 11 Jul 2024 20:39:52 +0900 Subject: [PATCH 2/3] Show fees rates on acceleration timeline --- .../acceleration-timeline.component.html | 220 +++++++++--------- .../acceleration-timeline.component.scss | 2 +- .../acceleration-timeline.component.ts | 2 + .../transaction/transaction.component.html | 2 +- .../transaction/transaction.component.scss | 1 + 5 files changed, 116 insertions(+), 111 deletions(-) diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html index 1cf14a54d..3e687a547 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html @@ -1,6 +1,41 @@ -@if (tx.status.confirmed) { -
+
+ @if (!tx.status.confirmed) { +
+
+
+
+
+
+
+ @if (eta) { + ~ + } +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
Mined
+
+
+
+ }
@@ -12,7 +47,13 @@
- + @if (tx.status.confirmed) { +
+ +
+ } @else if (standardETA && !tx.status.confirmed) { + + }
@@ -24,129 +65,90 @@
First seen
-
- +
+
-
+
-
-
+ @if (tx.status.confirmed) { +
+ } @else { +
+ } +
+ @if (!tx.status.confirmed) { +
+ }
-
Accelerated
-
- + @if (tx.status.confirmed) { +
Accelerated
+ } + @if (tx.status.confirmed && accelerationInfo) { +
+
+ } @else if (!tx.status.confirmed) { +
+ +
+ @if (now - acceleratedAt > 60) { +
+ +
+ } + } @else { +
+ +
+ }
+ @if (tx.status.confirmed) {
+ } @else { +
+ }
-
-
-
+
+ @if (tx.status.confirmed) { +
+ } @else { +
+ } +
-
Mined
-
- + @if (tx.status.confirmed) { +
Mined
+ } + @if (tx.status.confirmed && accelerationInfo) { +
+ @if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) { + @if (!tx.effectiveFeePerVsize) { + + } @else { + + } + } @else { + + } +
+ } @else if (!tx.status.confirmed) { + + } @else { +
+
+ }
-
+
-} @else if (acceleratedETA) { -} @else if (standardETA) { -
-
-
-
-
-
-
-
-
- @if (eta) { - ~ - } -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Mined
-
-
-
-
-
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
First seen
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- Accelerated  -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-} \ No newline at end of file diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss index dd815ba45..69f7580af 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss @@ -209,7 +209,7 @@ } .status { - margin-top: -64px; + margin-top: -66px; .badge.badge-waiting { opacity: 0.5; diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts index 38d48dd05..ff6411dc4 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit, OnChanges } from '@angular/core'; import { ETA } from '../../services/eta.service'; import { Transaction } from '../../interfaces/electrs.interface'; +import { Acceleration } from '../../interfaces/node-api.interface'; @Component({ selector: 'app-acceleration-timeline', @@ -10,6 +11,7 @@ import { Transaction } from '../../interfaces/electrs.interface'; export class AccelerationTimelineComponent implements OnInit, OnChanges { @Input() transactionTime: number; @Input() tx: Transaction; + @Input() accelerationInfo: Acceleration; @Input() eta: ETA; // A mined transaction has standard ETA and accelerated ETA undefined // A transaction in mempool has either standardETA defined (if accelerated) or acceleratedETA defined (if not accelerated yet) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 3e7c67359..211573869 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -167,7 +167,7 @@

Acceleration Timeline

- +
diff --git a/frontend/src/app/components/transaction/transaction.component.scss b/frontend/src/app/components/transaction/transaction.component.scss index 7db417126..45a44e2bf 100644 --- a/frontend/src/app/components/transaction/transaction.component.scss +++ b/frontend/src/app/components/transaction/transaction.component.scss @@ -158,6 +158,7 @@ .effective-fee-container { display: block; + width: 100%; @media (min-width: 768px){ display: inline-block; } From 6aa3e38af23b5ac1822e3d73d6d2acb1c31a9212 Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 12 Jul 2024 17:15:51 +0900 Subject: [PATCH 3/3] Fix broken loader in accelerate fee rate line --- .../src/app/components/transaction/transaction.component.html | 4 +--- .../src/app/components/transaction/transaction.component.scss | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 211573869..86c8dc780 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -640,9 +640,7 @@
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) { - @if (!tx.effectiveFeePerVsize) { - - } @else { + @if (tx.effectiveFeePerVsize) { } } @else { diff --git a/frontend/src/app/components/transaction/transaction.component.scss b/frontend/src/app/components/transaction/transaction.component.scss index 45a44e2bf..7db417126 100644 --- a/frontend/src/app/components/transaction/transaction.component.scss +++ b/frontend/src/app/components/transaction/transaction.component.scss @@ -158,7 +158,6 @@ .effective-fee-container { display: block; - width: 100%; @media (min-width: 768px){ display: inline-block; }