@@ -46,12 +46,11 @@ export class AddressLabelsComponent implements OnInit {
|
||||
}
|
||||
|
||||
[
|
||||
[/^OP_DUP OP_HASH160/, 'HTLC'],
|
||||
[/^OP_IF OP_PUSHBYTES_33 \w{33} OP_ELSE OP_PUSHBYTES_2 \w{2} OP_CSV OP_DROP/, 'Force Close']
|
||||
].forEach(
|
||||
([re, label]) => {
|
||||
if (re.test(this.vin.inner_witnessscript_asm)) {
|
||||
this.lightning = label;
|
||||
{regexp: /^OP_DUP OP_HASH160/, label: 'HTLC'},
|
||||
{regexp: /^OP_IF OP_PUSHBYTES_33 \w{33} OP_ELSE OP_PUSHBYTES_2 \w{2} OP_CSV OP_DROP/, label: 'Force Close'}
|
||||
].forEach((item) => {
|
||||
if (item.regexp.test(this.vin.inner_witnessscript_asm)) {
|
||||
this.lightning = item.label;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user