From: Chris Duncan Date: Fri, 15 May 2026 08:15:33 +0000 (-0700) Subject: Fix variable name conflict. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=9e21dacfad322ff48a7587bc72f9d5c8399286de;p=libnemo.git Fix variable name conflict. --- diff --git a/src/lib/crypto/bip44.ts b/src/lib/crypto/bip44.ts index 2b27e0e..929badc 100644 --- a/src/lib/crypto/bip44.ts +++ b/src/lib/crypto/bip44.ts @@ -117,11 +117,11 @@ function childKey (curve: Curve, pk: Bytes, I: ArrayBuffer): ExtendedKey { throw new Error('Invalid child key is greater than the order of the curve') } const pkParsed = parse256(pk) - const childKey = (ILparsed + pkParsed) % Point.CURVE().n - if (childKey === 0n) { + const ck = (ILparsed + pkParsed) % Point.CURVE().n + if (ck === 0n) { throw new Error('Invalid child key is zero') } - return ({ privateKey: ser256(childKey).buffer, chainCode: IR }) + return ({ privateKey: ser256(ck).buffer, chainCode: IR }) } function ser32 (integer: number): Bytes {