From: Chris Duncan Date: Tue, 4 Aug 2026 23:13:45 +0000 (-0700) Subject: Replace unsafe password check result with loggable feedback. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=658ceac1913f7a1858356437eb8b38a18aa4c5af;p=libnemo.git Replace unsafe password check result with loggable feedback. --- diff --git a/src/lib/wallet/index.ts b/src/lib/wallet/index.ts index bc0bb80..6db838e 100644 --- a/src/lib/wallet/index.ts +++ b/src/lib/wallet/index.ts @@ -48,9 +48,9 @@ export class Wallet { if (typeof password !== 'string') { throw new TypeError('Password must be a string') } - const passwordCheck = this.#zxcvbn.check(password) - if (passwordCheck.score < 4) { - throw new RangeError('Weak password', { cause: passwordCheck }) + const { feedback, score } = this.#zxcvbn.check(password) + if (score < 4) { + throw new RangeError('Weak password', { cause: feedback }) } }