From eb719ee947c085ab8d8b71d9f181bb434d10a380 Mon Sep 17 00:00:00 2001 From: Inokentii Mazhara Date: Mon, 30 Sep 2024 16:22:36 +0300 Subject: [PATCH] TW-1545 Fix auto-lock for newly installed extension --- src/lib/local-storage/migrations.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/local-storage/migrations.ts b/src/lib/local-storage/migrations.ts index 9c39ca0cf..2f3fb4887 100644 --- a/src/lib/local-storage/migrations.ts +++ b/src/lib/local-storage/migrations.ts @@ -33,9 +33,10 @@ migrate([ const rawIsLocked = localStorage.getItem(TempleSharedStorageKey.LockUpEnabled); localStorage.removeItem(TempleSharedStorageKey.LockUpEnabled); - putToStorage(AUTOLOCK_TIME_STORAGE_KEY, rawIsLocked ? DEFAULT_WALLET_AUTOLOCK_TIME : NEVER_AUTOLOCK_VALUE).catch( - e => console.error(e) - ); + putToStorage( + AUTOLOCK_TIME_STORAGE_KEY, + rawIsLocked === 'true' || rawIsLocked === null ? DEFAULT_WALLET_AUTOLOCK_TIME : NEVER_AUTOLOCK_VALUE + ).catch(e => console.error(e)); } } ]);