Merge pull request #5471 from mempool/natsoni/hide-acc-checkout-on-accelerations
Avoid brief display of accelerator checkout on already accelerated txs
This commit is contained in:
commit
d8cfc6e32d
@ -554,13 +554,13 @@
|
|||||||
@if (network === 'liquid' || network === 'liquidtestnet') {
|
@if (network === 'liquid' || network === 'liquidtestnet') {
|
||||||
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
|
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||||
} @else {
|
} @else {
|
||||||
<span [class]="(!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !showAccelerationSummary) ? 'etaDeepMempool d-flex justify-content-between' : ''">
|
<span [class]="(!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !showAccelerationSummary && notAcceleratedOnLoad) ? 'etaDeepMempool d-flex justify-content-between' : ''">
|
||||||
@if (eta.blocks >= 7) {
|
@if (eta.blocks >= 7) {
|
||||||
<span i18n="transaction.eta.not-any-time-soon|Transaction ETA mot any time soon">Not any time soon</span>
|
<span i18n="transaction.eta.not-any-time-soon|Transaction ETA mot any time soon">Not any time soon</span>
|
||||||
} @else {
|
} @else {
|
||||||
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
|
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
|
||||||
}
|
}
|
||||||
@if (!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !showAccelerationSummary) {
|
@if (!tx?.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !showAccelerationSummary && notAcceleratedOnLoad) {
|
||||||
<div class="d-flex accelerate">
|
<div class="d-flex accelerate">
|
||||||
<a class="btn btn-sm accelerateDeepMempool btn-small-height" [class.disabled]="!eligibleForAcceleration" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a>
|
<a class="btn btn-sm accelerateDeepMempool btn-small-height" [class.disabled]="!eligibleForAcceleration" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a>
|
||||||
<a *ngIf="!eligibleForAcceleration" href="https://mempool.space/accelerator#why-cant-accelerate" target="_blank" class="info-badges ml-1" i18n-ngbTooltip="Mempool Accelerator™ tooltip" ngbTooltip="This transaction cannot be accelerated">
|
<a *ngIf="!eligibleForAcceleration" href="https://mempool.space/accelerator#why-cant-accelerate" target="_blank" class="info-badges ml-1" i18n-ngbTooltip="Mempool Accelerator™ tooltip" ngbTooltip="This transaction cannot be accelerated">
|
||||||
|
@ -139,6 +139,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
firstLoad = true;
|
firstLoad = true;
|
||||||
waitingForAccelerationInfo: boolean = false;
|
waitingForAccelerationInfo: boolean = false;
|
||||||
isLoadingFirstSeen = false;
|
isLoadingFirstSeen = false;
|
||||||
|
notAcceleratedOnLoad: boolean = null;
|
||||||
|
|
||||||
featuresEnabled: boolean;
|
featuresEnabled: boolean;
|
||||||
segwitEnabled: boolean;
|
segwitEnabled: boolean;
|
||||||
@ -848,6 +849,10 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.tx.feeDelta = cpfpInfo.feeDelta;
|
this.tx.feeDelta = cpfpInfo.feeDelta;
|
||||||
this.setIsAccelerated(firstCpfp);
|
this.setIsAccelerated(firstCpfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.notAcceleratedOnLoad === null) {
|
||||||
|
this.notAcceleratedOnLoad = !this.isAcceleration;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.isAcceleration && this.fragmentParams.has('accelerate')) {
|
if (!this.isAcceleration && this.fragmentParams.has('accelerate')) {
|
||||||
this.forceAccelerationSummary = true;
|
this.forceAccelerationSummary = true;
|
||||||
@ -1084,6 +1089,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
(!this.hideAccelerationSummary && !this.accelerationFlowCompleted)
|
(!this.hideAccelerationSummary && !this.accelerationFlowCompleted)
|
||||||
|| this.forceAccelerationSummary
|
|| this.forceAccelerationSummary
|
||||||
)
|
)
|
||||||
|
&& this.notAcceleratedOnLoad // avoid briefly showing accelerator checkout on already accelerated txs
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user