Skip to content

Commit de3e775

Browse files
committed
refactor: suggested destructuring
1 parent 2c120fa commit de3e775

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/models/p2sh_signature.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ class P2SHSignature {
5656
const xpub = arr[0];
5757
const signatures: Record<number, string> = {};
5858
for (const sig of arr.slice(1)) {
59-
const parts = sig.split(':');
60-
// eslint-disable-next-line prefer-destructuring -- Destructuring would make this harder to read
61-
signatures[+parts[0]] = parts[1];
59+
const [key, value] = sig.split(':');
60+
signatures[+key] = value;
6261
}
6362
return new P2SHSignature(xpub, signatures);
6463
}

0 commit comments

Comments
 (0)