From 3fe473a5c5187fb81b9b7856f8b070315e868180 Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Fri, 12 Aug 2022 07:54:37 +0200 Subject: [PATCH 1/2] fix: migration from localstorage to idb --- packages/auth-client/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth-client/src/index.ts b/packages/auth-client/src/index.ts index 3b5dacabd..323bbfb3d 100644 --- a/packages/auth-client/src/index.ts +++ b/packages/auth-client/src/index.ts @@ -198,7 +198,7 @@ export class AuthClient { if (!maybeIdentityStorage) { // Attempt to migrate from localstorage try { - const fallbackLocalStorage = new LocalStorage('ic'); + const fallbackLocalStorage = new LocalStorage(); const localChain = await fallbackLocalStorage.get(KEY_STORAGE_DELEGATION); const localKey = await fallbackLocalStorage.get(KEY_STORAGE_KEY); if (localChain && localKey) { From 19f846a6ca60408f900c85fa7d32232c41b2d987 Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Fri, 12 Aug 2022 08:02:29 +0200 Subject: [PATCH 2/2] test: use key ic- for test too --- packages/auth-client/src/index.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth-client/src/index.test.ts b/packages/auth-client/src/index.test.ts index e58febc03..8f6f96a0f 100644 --- a/packages/auth-client/src/index.test.ts +++ b/packages/auth-client/src/index.test.ts @@ -612,7 +612,7 @@ describe('Migration from localstorage', () => { expect(storage.set as jest.Mock).toBeCalledTimes(0); }); it('should migrate storage from localstorage', async () => { - const localStorage = new LocalStorage('ic'); + const localStorage = new LocalStorage(); const storage: AuthClientStorage = { remove: jest.fn(), get: jest.fn(),