]> git.codecow.com Git - libnemo.git/commitdiff
Fix wallet automatic lock timeout.
authorChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 06:24:15 +0000 (23:24 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 06:24:15 +0000 (23:24 -0700)
src/lib/wallet.ts

index b3de04e74639da3697913cc8809890534e585a2e..f0513bbd223ed214e95a680ebe20b84b7d0fc73d 100644 (file)
@@ -278,6 +278,7 @@ export class Wallet {
                                throw new Error('Failed to delete wallet from database')\r
                        }\r
                        this.#safe.terminate()\r
+                       clearTimeout(this.#lockTimer)\r
                } catch (err) {\r
                        console.error(err)\r
                        throw new Error('Failed to destroy wallet', { cause: err })\r
@@ -351,7 +352,7 @@ export class Wallet {
                        const sig = bytes.toHex(new Uint8Array(signature))\r
                        block.signature = sig\r
                        clearTimeout(this.#lockTimer)\r
-                       this.#lockTimer = setTimeout(() => this.lock(), 120)\r
+                       this.#lockTimer = setTimeout(() => this.lock(), 300000)\r
                        return sig\r
                } catch (err) {\r
                        throw new Error(`Failed to sign block`, { cause: err })\r