From: Chris Duncan Date: Wed, 12 Aug 2026 05:57:09 +0000 (-0700) Subject: Reduce requested autolock timer by 1 second to account for browser lag. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7de7defc38747fca4ea45bf7bab942445114acb9;p=libnemo.git Reduce requested autolock timer by 1 second to account for browser lag. --- diff --git a/src/lib/vault/vault-worker.ts b/src/lib/vault/vault-worker.ts index 5a4d42d..e49d47c 100644 --- a/src/lib/vault/vault-worker.ts +++ b/src/lib/vault/vault-worker.ts @@ -141,7 +141,7 @@ function config (timeout?: number): Promise { if (timeout > 600) { throw new VaultError('Timeout must be at most 10 minutes') } - _timeout = timeout * 1000 + _timeout = (timeout - 1) * 1000 _timer.reset(_timeout) return Promise.resolve() } catch (err) { @@ -345,7 +345,6 @@ function unlock (type?: WalletType, id?: UUID, key?: CryptoKey, iv?: ArrayBuffer if (encrypted == null) { throw new VaultError('Wallet encrypted data is required') } - _timer?.pause() return WalletAesGcm.decrypt(type, id, key, iv, encrypted) .then(({ mnemonic, seed }) => { if (!(seed instanceof ArrayBuffer)) {