- @if (tx.status.confirmed) {
+ @if (tx.status.confirmed && !canceled) {
} @else {
}
- @if (!tx.status.confirmed) {
-
+ @if (!tx.status.confirmed || canceled) {
+
}
- @if (tx.status.confirmed) {
+ @if (tx.status.confirmed && !canceled) {
Accelerated
}
-
+
@if (!tx.status.confirmed) {
Accelerated{{ "" }}
}
@if (useAbsoluteTime) {
{{ acceleratedAt * 1000 | date }}
} @else {
-
+
}
- @if (tx.status.confirmed) {
+ @if (tx.status.confirmed && !canceled) {
} @else {
}
- @if (tx.status.confirmed) {
+ @if (tx.status.confirmed && !canceled) {
} @else {
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 f351a0114..2bd46199a 100644
--- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss
+++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.scss
@@ -129,6 +129,9 @@
margin-left: calc(-4em + 5px);
animation: goFasterLeft 0.8s infinite linear;
}
+ &.no-animation {
+ animation: none;
+ }
}
&.left {
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 728992212..59e63d839 100644
--- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts
+++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts
@@ -15,6 +15,7 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges {
@Input() tx: Transaction;
@Input() accelerationInfo: Acceleration;
@Input() eta: ETA;
+ @Input() canceled: boolean;
now: number;
accelerateRatio: number;
diff --git a/frontend/src/app/components/transaction/transaction-details/transaction-details.component.html b/frontend/src/app/components/transaction/transaction-details/transaction-details.component.html
index 9bdf4066a..0bfcb494e 100644
--- a/frontend/src/app/components/transaction/transaction-details/transaction-details.component.html
+++ b/frontend/src/app/components/transaction/transaction-details/transaction-details.component.html
@@ -247,7 +247,7 @@
@if (!isLoadingTx) {
- @if ((cpfpInfo && hasEffectiveFeeRate) || accelerationInfo) {
+ @if ((cpfpInfo && hasEffectiveFeeRate) || (accelerationInfo && isAcceleration)) {
@if (isAcceleration) {
Accelerated fee rate |
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 4810e1d94..8c2d9de01 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -165,12 +165,12 @@
- 0 && tx.acceleratedAt > 0 && isAcceleration">
+ 0 && tx.acceleratedAt > 0 && (isAcceleration || accelerationCanceled)">
Acceleration Timeline
-
+
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index a1b48766a..71ffaa2cd 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -107,6 +107,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
pool: Pool | null;
auditStatus: TxAuditStatus | null;
isAcceleration: boolean = false;
+ accelerationCanceled: boolean = false;
filters: Filter[] = [];
showCpfpDetails = false;
miningStats: MiningStats;
@@ -360,16 +361,17 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
).subscribe((accelerationHistory) => {
for (const acceleration of accelerationHistory) {
if (acceleration.txid === this.txId) {
- if (acceleration.status === 'completed' || acceleration.status === 'completed_provisional') {
- if (acceleration.pools.includes(acceleration.minedByPoolUniqueId)) {
- const boostCost = acceleration.boostCost || acceleration.bidBoost;
- acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize;
- acceleration.boost = boostCost;
- this.tx.acceleratedAt = acceleration.added;
- this.accelerationInfo = acceleration;
- } else {
- this.tx.feeDelta = undefined;
- }
+ if ((acceleration.status === 'completed' || acceleration.status === 'completed_provisional') && acceleration.pools.includes(acceleration.minedByPoolUniqueId)) {
+ const boostCost = acceleration.boostCost || acceleration.bidBoost;
+ acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize;
+ acceleration.boost = boostCost;
+ this.tx.acceleratedAt = acceleration.added;
+ this.accelerationInfo = acceleration;
+ }
+ if (acceleration.status === 'failed' || acceleration.status === 'failed_provisional') {
+ this.accelerationCanceled = true;
+ this.tx.acceleratedAt = acceleration.added;
+ this.accelerationInfo = acceleration;
}
this.waitingForAccelerationInfo = false;
this.setIsAccelerated();
@@ -878,9 +880,13 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.tx.acceleratedBy = cpfpInfo.acceleratedBy;
this.tx.acceleratedAt = cpfpInfo.acceleratedAt;
this.tx.feeDelta = cpfpInfo.feeDelta;
+ this.accelerationCanceled = false;
this.setIsAccelerated(firstCpfp);
- } else if (this.tx.acceleration) { // Acceleration was cancelled while on the tx page, reset acceleration state
- this.tx.acceleration = false;
+ } else if (cpfpInfo.acceleratedAt) { // Acceleration was cancelled: reset acceleration state
+ this.tx.acceleratedBy = cpfpInfo.acceleratedBy;
+ this.tx.acceleratedAt = cpfpInfo.acceleratedAt;
+ this.tx.feeDelta = cpfpInfo.feeDelta;
+ this.accelerationCanceled = true;
this.setIsAccelerated(firstCpfp);
}
@@ -904,7 +910,12 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
setIsAccelerated(initialState: boolean = false) {
- this.isAcceleration = ((this.tx.acceleration && (!this.tx.status.confirmed || this.waitingForAccelerationInfo)) || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
+ this.isAcceleration =
+ (
+ (this.tx.acceleration && (!this.tx.status.confirmed || this.waitingForAccelerationInfo)) ||
+ (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id)))
+ ) &&
+ !this.accelerationCanceled;
if (this.isAcceleration) {
if (initialState) {
this.accelerationFlowCompleted = true;