From 658ceac1913f7a1858356437eb8b38a18aa4c5af Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 4 Aug 2026 16:13:45 -0700 Subject: [PATCH] Replace unsafe password check result with loggable feedback. --- src/lib/wallet/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }) } } -- 2.52.0