Merge pull request #5241 from vostrnad/baremultisig-labels

Fix missing bare multisig labels
This commit is contained in:
softsimon authored and GitHub committed 2024-07-01 19:06:07 +09:00
commit c4b45180dd
2 files changed
+31 -3

No files matched your search

@@ -33,6 +33,8 @@ export class AddressLabelsComponent implements OnChanges {
this.handleAddress();
} else if (this.vin) {
this.handleVin();
} else if (this.vout) {
this.handleVout();
}
}
@@ -61,4 +63,14 @@ export class AddressLabelsComponent implements OnChanges {
}
}
}
handleVout() {
const address = new AddressTypeInfo(this.network || 'mainnet', this.vout.scriptpubkey_address, this.vout.scriptpubkey_type as AddressType, undefined, this.vout);
if (address?.scripts.size) {
const script = address?.scripts.values().next().value;
if (script.template?.label) {
this.label = script.template.label;
}
}
}
}