From 338f39c83be7e8d1672384b18d5a991d9903ffc3 Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 9 Aug 2024 17:26:09 +0200 Subject: [PATCH] Don't show effective fee rate on accelerated tx --- .../app/components/transaction/transaction.component.html | 6 +++--- .../src/app/components/transaction/transaction.component.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index ecd00e599..df23eb719 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -629,7 +629,7 @@ Fee rate - @if (tx?.status?.confirmed && tx.fee && !hasEffectiveFeeRate && !accelerationInfo) { + @if (tx?.status?.confirmed && tx.fee && !hasEffectiveFeeRate && !accelerationInfo?.acceleratedFeeRate) {   } @@ -642,7 +642,7 @@ @if (!isLoadingTx) { - @if ((cpfpInfo && hasEffectiveFeeRate) || accelerationInfo) { + @if ((cpfpInfo && hasEffectiveFeeRate) || accelerationInfo?.acceleratedFeeRate) { @if (isAcceleration) { Accelerated fee rate @@ -657,7 +657,7 @@ } - @if (tx?.status?.confirmed && !tx.acceleration && !accelerationInfo && tx.fee && tx.effectiveFeePerVsize) { + @if (tx?.status?.confirmed && !tx.acceleration && !accelerationInfo?.acceleratedFeeRate && tx.fee && tx.effectiveFeePerVsize) { } diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index bcad164cc..dcd43c851 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -360,7 +360,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { for (const acceleration of accelerationHistory) { if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) { const boostCost = acceleration.boostCost || acceleration.bidBoost; - acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; + if (acceleration.pools.includes(acceleration.minedByPoolUniqueId)) { + acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; + } acceleration.boost = boostCost; this.tx.acceleratedAt = acceleration.added; this.accelerationInfo = acceleration;