From: Chris Duncan Date: Thu, 6 Aug 2026 03:31:39 +0000 (-0700) Subject: Whitespace. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=affaf339e2101c26633fea68d6b4068bf7e97be8;p=libnemo.git Whitespace. --- diff --git a/src/lib/tools.ts b/src/lib/tools.ts index ee3d09d..97e19c2 100644 --- a/src/lib/tools.ts +++ b/src/lib/tools.ts @@ -201,7 +201,7 @@ export function verify (publicKey: string | ArrayBuffer | Bytes, signature: stri } finally { k.fill(0) s.fill(0) - } + } } function normalize (input: string | ArrayBuffer | Bytes): Bytes { diff --git a/src/lib/vault/parsers.ts b/src/lib/vault/parsers.ts index 9e8cae9..db696f2 100644 --- a/src/lib/vault/parsers.ts +++ b/src/lib/vault/parsers.ts @@ -44,11 +44,11 @@ export function parseData (action: string, data: Record) { if (!(data.seed instanceof ArrayBuffer)) { throw new TypeError('Invalid wallet seed') } - if (['load', 'verify'].includes(action)) { + if (['load', 'verify'].includes(action)) { seed = data.seed.slice() } new Uint8Array(data.seed).fill(0) - delete data.seed + delete data.seed } // Mnemonic phrase to load @@ -73,13 +73,13 @@ export function parseData (action: string, data: Record) { if ('encrypted' in data) { if (action === 'unlock') { if (!(data.encrypted instanceof ArrayBuffer)) { - throw new TypeError('Invalid wallet encrypted secrets') + throw new TypeError('Invalid wallet encrypted secrets') } encrypted = data.encrypted.slice() } new Uint8Array(data.encrypted as ArrayBuffer).fill(0) delete data.encrypted - } + } // Index for child account to derive or sign if ((action === 'derive' || action === 'sign') && typeof data.index !== 'number') { @@ -99,7 +99,7 @@ export function parseData (action: string, data: Record) { } new Uint8Array(data.message as ArrayBuffer).fill(0) delete data.message - } + } // Vault configuration if (action === 'config') { diff --git a/src/lib/vault/vault-worker.ts b/src/lib/vault/vault-worker.ts index ec4b40a..7ad63f1 100644 --- a/src/lib/vault/vault-worker.ts +++ b/src/lib/vault/vault-worker.ts @@ -163,7 +163,7 @@ function create (type?: WalletType, id?: UUID, key?: CryptoKey, keySalt?: ArrayB throw new Error('Failed to create wallet', { cause: err }) }) .finally(() => lock()) - } +} /** * Derives the private and public keys of a child account from the current diff --git a/src/lib/wallet/unopened.ts b/src/lib/wallet/unopened.ts index 32a2834..ab8fb8b 100644 --- a/src/lib/wallet/unopened.ts +++ b/src/lib/wallet/unopened.ts @@ -41,6 +41,6 @@ export async function _unopened (wallet: Wallet, rpc: unknown, batchSize: unknow } if (to >= 0xffffffff) { throw new RangeError('Max index reached') - } + } return await _unopened(wallet, rpc, batchSize, to) }