Merge pull request #5723 from mempool/mononaut/fix-cached-tx-badge

Fix unconfirmed badge on broken RBF txs
This commit is contained in:
softsimon 2025-01-17 10:15:35 +07:00 committed by GitHub
commit e7af43efa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@
[height]="tx?.status?.block_height"
[replaced]="replaced"
[removed]="this.rbfInfo?.mined && !this.tx?.status?.confirmed"
[cached]="isCached"
></app-confirmations>
</div>
</ng-container>

View File

@ -11,9 +11,9 @@
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && replaced">
<button type="button" class="btn btn-sm btn-warning no-cursor {{buttonClass}}" i18n="transaction.replaced|Transaction replaced state">Replaced</button>
</ng-template>
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && !replaced && removed">
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && !replaced && (removed || cached)">
<button type="button" class="btn btn-sm btn-warning no-cursor {{buttonClass}}" i18n="transaction.audit.removed|Transaction removed state">Removed</button>
</ng-template>
<ng-template [ngIf]="!hideUnconfirmed && chainTip != null && !confirmations && !replaced && !removed">
<ng-template [ngIf]="!hideUnconfirmed && chainTip != null && !confirmations && !replaced && !(removed || cached)">
<button type="button" class="btn btn-sm btn-danger no-cursor {{buttonClass}}" i18n="transaction.unconfirmed|Transaction unconfirmed state">Unconfirmed</button>
</ng-template>

View File

@ -12,6 +12,7 @@ export class ConfirmationsComponent implements OnChanges {
@Input() height: number;
@Input() replaced: boolean = false;
@Input() removed: boolean = false;
@Input() cached: boolean = false;
@Input() hideUnconfirmed: boolean = false;
@Input() buttonClass: string = '';