Merge pull request #5241 from vostrnad/baremultisig-labels

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

View File

@@ -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;
}
}
}
}