Fix accelerated badge in block overview tooltip
This commit is contained in:
parent
1b21cd89a3
commit
952a61f8f2
@ -61,10 +61,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
{{ activeFilters.rbf }}
|
||||
<tr *ngIf="(!auditEnabled && tx && tx.status === 'accelerated') || filters.length">
|
||||
<tr *ngIf="(!auditEnabled && tx && (tx.status === 'accelerated' || tx.acc || acceleration)) || filters.length">
|
||||
<td colspan="2">
|
||||
<div class="tags mt-2" [class.any-mode]="filterMode === 'or'">
|
||||
<span *ngIf="!auditEnabled && tx && tx.status === 'accelerated'" class="badge badge-accelerated" i18n="transaction.audit.accelerated">Accelerated</span>
|
||||
<span *ngIf="!auditEnabled && tx && (tx.status === 'accelerated' || tx.acc || acceleration)" class="badge badge-accelerated" i18n="transaction.audit.accelerated">Accelerated</span>
|
||||
<ng-container *ngFor="let filter of filters;">
|
||||
<span class="btn badge filter-tag" [class.matching]="activeFilters[filter.key]">{{ filter.label }}</span>
|
||||
</ng-container>
|
||||
|
@ -9,8 +9,8 @@
|
||||
justify-content: space-between;
|
||||
padding: 10px 15px;
|
||||
text-align: left;
|
||||
min-width: 320px;
|
||||
max-width: 320px;
|
||||
min-width: 340px;
|
||||
max-width: 340px;
|
||||
pointer-events: none;
|
||||
z-index: 11;
|
||||
|
||||
|
@ -61,8 +61,8 @@ export class BlockOverviewTooltipComponent implements OnChanges {
|
||||
this.vsize = this.tx.vsize || 1;
|
||||
this.feeRate = this.fee / this.vsize;
|
||||
this.effectiveRate = this.tx.rate;
|
||||
this.acceleration = this.tx.acc;
|
||||
const txFlags = BigInt(this.tx.flags) || 0n;
|
||||
this.acceleration = this.tx.acc || (txFlags & TransactionFlags.acceleration);
|
||||
this.hasEffectiveRate = Math.abs((this.fee / this.vsize) - this.effectiveRate) > 0.05
|
||||
|| (txFlags && (txFlags & (TransactionFlags.cpfp_child | TransactionFlags.cpfp_parent)) > 0n);
|
||||
this.filters = this.tx.flags ? toFilters(txFlags).filter(f => f.tooltip) : [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user