Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: migration from localstorage to idb #608

Merged
merged 2 commits into from Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth-client/src/index.test.ts
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-client/src/index.ts
Expand Up @@ -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) {
Expand Down