From 46bce30a64080cb558d50b4c9c29f71f5ed50ffd Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <56turtle56@gmail.com> Date: Sun, 24 Jul 2022 19:39:13 +0200 Subject: [PATCH] add taproot badge with only privacy tooltip if no fees can be saved --- .../components/tx-features/tx-features.component.html | 9 ++++++--- .../app/components/tx-features/tx-features.component.ts | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/tx-features/tx-features.component.html b/frontend/src/app/components/tx-features/tx-features.component.html index 49a1fa90f..16dbb66f4 100644 --- a/frontend/src/app/components/tx-features/tx-features.component.html +++ b/frontend/src/app/components/tx-features/tx-features.component.html @@ -6,11 +6,14 @@ -Taproot +Taproot - Taproot + Taproot - Taproot + Taproot + + Taproot + diff --git a/frontend/src/app/components/tx-features/tx-features.component.ts b/frontend/src/app/components/tx-features/tx-features.component.ts index ce25bb097..f73d8ae8a 100644 --- a/frontend/src/app/components/tx-features/tx-features.component.ts +++ b/frontend/src/app/components/tx-features/tx-features.component.ts @@ -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'); } }