Fix accelerated badge in block overview tooltip

This commit is contained in:
Mononaut
2024-03-26 02:33:33 +00:00
parent 1b21cd89a3
commit 952a61f8f2
3 changed files with 5 additions and 5 deletions

View File

@@ -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) : [];