add taproot badge with only privacy tooltip if no fees can be saved

This commit is contained in:
Antoni Spaanderman
2022-07-24 19:39:13 +02:00
parent b875bc2552
commit 46bce30a64
2 changed files with 8 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ export class TxFeaturesComponent implements OnChanges {
realizedTaprootGains: 0
};
isRbfTransaction: boolean;
isTaproot: boolean;
constructor() { }
@@ -28,5 +29,6 @@ export class TxFeaturesComponent implements OnChanges {
}
this.segwitGains = calcSegwitFeeGains(this.tx);
this.isRbfTransaction = this.tx.vin.some((v) => v.sequence < 0xfffffffe);
this.isTaproot = this.tx.vin.some((v) => v.prevout && v.prevout.scriptpubkey_type === 'v1_p2tr');
}
}