Fix unconfirmed badge on broken RBF txs

This commit is contained in:
Mononaut 2025-01-13 07:11:17 +00:00
parent 0a255d7fe5
commit 6a4aeaf7ed
No known key found for this signature in database
GPG key ID: A3F058E41374C04E
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 = '';