Skip to content

Commit 18e07b4

Browse files
committed
Fix linter.
1 parent e4f524c commit 18e07b4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/bip39/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ export function mnemonicToSeed(mnemonic: string, passphrase = "") {
9999
assertMnemonic(mnemonic);
100100
return pbkdf2Async(sha512, nfkd(mnemonic), salt(passphrase), {
101101
c: 2048,
102-
dkLen: 64,
102+
dkLen: 64
103103
});
104104
}
105105

106106
export function mnemonicToSeedSync(mnemonic: string, passphrase = "") {
107107
assertMnemonic(mnemonic);
108108
return pbkdf2(sha512, nfkd(mnemonic), salt(passphrase), {
109109
c: 2048,
110-
dkLen: 64,
110+
dkLen: 64
111111
});
112112
}

src/hdkey.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class HDKey {
9999
): HDKey {
100100
if (8 * seed.length < 128 || 8 * seed.length > 512) {
101101
throw new Error(
102-
"HDKey: wrong seed length=${seed.length}. Should be between 128 and 512 bits; 256 bits is advised)"
102+
`HDKey: wrong seed length=${seed.length}. Should be between 128 and 512 bits; 256 bits is advised)`
103103
);
104104
}
105105
const I = hmac(sha512, MASTER_SECRET, seed);
@@ -160,10 +160,11 @@ export class HDKey {
160160
this.index = opt.index || 0;
161161
this.parentFingerprint = opt.parentFingerprint || 0;
162162
if (!this.depth) {
163-
if (this.parentFingerprint || this.index)
163+
if (this.parentFingerprint || this.index) {
164164
throw new Error(
165165
"HDKey: zero depth with non-zero index/parent fingerprint"
166166
);
167+
}
167168
}
168169
if (opt.publicKey && opt.privateKey) {
169170
throw new Error("HDKey: publicKey and privateKey at same time.");

test/test-vectors/hdkey.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ describe("hdkey", () => {
599599
"xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6Q5JXayek4PRsn35jii4veMimro1xefsM58PgBMrvdYre8QyULY", // (invalid pubkey 020000000000000000000000000000000000000000000000000000000000000007)
600600
"xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHL" // (invalid checksum)
601601
];
602-
for (let c of keys) throws(() => HDKey.fromExtendedKey(c));
602+
for (const c of keys) {
603+
throws(() => HDKey.fromExtendedKey(c));
604+
}
603605
});
604606
});
605607
});

0 commit comments

Comments
 (0)