diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 55f7047e6..39c482730 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -537,7 +537,7 @@ } @else if (this.mempoolPosition.block >= 7) { In several hours (or more) - @if (!(isMobile && paymentType === 'cashapp') && !tx.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) { + @if (!(isMobile && paymentType === 'cashapp') && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) { Accelerate } diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 158d56c7d..10f61f04a 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -669,6 +669,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.hasEffectiveFeeRate = false; return; } + const firstCpfp = this.cpfpInfo == null; // merge ancestors/descendants const relatives = [...(cpfpInfo.ancestors || []), ...(cpfpInfo.descendants || [])]; if (cpfpInfo.bestDescendant && !cpfpInfo.descendants?.length) { @@ -688,7 +689,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { } if (cpfpInfo.acceleration) { this.tx.acceleration = cpfpInfo.acceleration; - this.setIsAccelerated(); + this.setIsAccelerated(firstCpfp); } this.cpfpInfo = cpfpInfo; @@ -700,8 +701,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.hasEffectiveFeeRate = hasRelatives || (this.tx.effectiveFeePerVsize && (Math.abs(this.tx.effectiveFeePerVsize - this.tx.feePerVsize) > 0.01)); } - setIsAccelerated() { + setIsAccelerated(initialState: boolean = false) { this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id || pool?.['pool_unique_id'] === this.pool.id)))); + if (this.isAcceleration && initialState) { + this.showAccelerationSummary = false; + } } setFeatures(): void {