mirror of
https://github.com/element-hq/element-desktop
synced 2025-04-21 09:03:56 +02:00
Add logging
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
6964c51cc3
commit
bec721cf57
25
src/store.ts
25
src/store.ts
@ -102,17 +102,22 @@ class Store extends ElectronStore<{
|
|||||||
throw new Error("safeStorage is not available");
|
throw new Error("safeStorage is not available");
|
||||||
}
|
}
|
||||||
|
|
||||||
const credentials = [
|
try {
|
||||||
...(await keytar.findCredentials(LEGACY_KEYTAR_SERVICE)),
|
const credentials = [
|
||||||
...(await keytar.findCredentials(KEYTAR_SERVICE)),
|
...(await keytar.findCredentials(LEGACY_KEYTAR_SERVICE)),
|
||||||
];
|
...(await keytar.findCredentials(KEYTAR_SERVICE)),
|
||||||
for (const cred of credentials) {
|
];
|
||||||
console.info("Store migration: writing", cred);
|
for (const cred of credentials) {
|
||||||
await this.setSecret(cred.account, cred.password);
|
console.info("Store migration: writing", cred);
|
||||||
console.info("Store migration: deleting", cred);
|
await this.setSecret(cred.account, cred.password);
|
||||||
await this.deleteSecretKeytar(LEGACY_KEYTAR_SERVICE, cred.account);
|
console.info("Store migration: deleting", cred);
|
||||||
|
await this.deleteSecretKeytar(LEGACY_KEYTAR_SERVICE, cred.account);
|
||||||
|
}
|
||||||
|
console.info(`Store migration done: found ${credentials.length} credentials`);
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Store migration failed:", e);
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
console.info(`Store migration done: found ${credentials.length} credentials`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user