From: Chris Duncan Date: Sat, 2 Aug 2025 06:24:15 +0000 (-0700) Subject: Fix wallet automatic lock timeout. X-Git-Tag: v0.10.5~47^2~24 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=17e79213607c1b63a3a3fc4c9353a931be6b2ed0;p=libnemo.git Fix wallet automatic lock timeout. --- diff --git a/src/lib/wallet.ts b/src/lib/wallet.ts index b3de04e..f0513bb 100644 --- a/src/lib/wallet.ts +++ b/src/lib/wallet.ts @@ -278,6 +278,7 @@ export class Wallet { throw new Error('Failed to delete wallet from database') } this.#safe.terminate() + clearTimeout(this.#lockTimer) } catch (err) { console.error(err) throw new Error('Failed to destroy wallet', { cause: err }) @@ -351,7 +352,7 @@ export class Wallet { const sig = bytes.toHex(new Uint8Array(signature)) block.signature = sig clearTimeout(this.#lockTimer) - this.#lockTimer = setTimeout(() => this.lock(), 120) + this.#lockTimer = setTimeout(() => this.lock(), 300000) return sig } catch (err) { throw new Error(`Failed to sign block`, { cause: err })