From 1a5bb7d0ac4f24a43c56bcb767244186c61613c9 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 3 Jul 2025 16:14:44 -0700 Subject: [PATCH] Tweak wallet lock and unlock response handling. --- src/lib/wallets/wallet.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/wallets/wallet.ts b/src/lib/wallets/wallet.ts index c69bd9f..df110db 100644 --- a/src/lib/wallets/wallet.ts +++ b/src/lib/wallets/wallet.ts @@ -244,13 +244,13 @@ export abstract class Wallet { if (typeof this.#seed === 'string') { data.seed = this.#seed } - const res = await this.#poolSafe.assign({ + const response = (await this.#poolSafe.assign({ method: 'put', name: this.id, password, data - }) - const success = res[0].result + }))[0] + const success = response.result if (!success) { throw null } @@ -284,12 +284,12 @@ export abstract class Wallet { throw new Error('Failed to unlock wallet') } try { - const res = await this.#poolSafe.assign({ + const response = (await this.#poolSafe.assign({ method: 'get', name: this.id, password - }) - const { id, mnemonic, seed } = res[0].result + }))[0] + const { id, mnemonic, seed } = response.result if (id !== this.id) { throw null } -- 2.47.3