apply changes from review, and other fixes/improvements
This commit is contained in:
parent
753ec9e45a
commit
649ea0d148
4 changed files with 166 additions and 125 deletions
|
@ -26,7 +26,7 @@ import {CheckUpdatesPayload} from "./dispatcher/payloads/CheckUpdatesPayload";
|
|||
import {Action} from "./dispatcher/actions";
|
||||
import {hideToast as hideUpdateToast} from "./toasts/UpdateToast";
|
||||
import {MatrixClientPeg} from "./MatrixClientPeg";
|
||||
import {idbLoad, idbSave, idbDelete} from "./IndexedDB";
|
||||
import {idbLoad, idbSave, idbDelete} from "./utils/StorageManager";
|
||||
|
||||
export const SSO_HOMESERVER_URL_KEY = "mx_sso_hs_url";
|
||||
export const SSO_ID_SERVER_URL_KEY = "mx_sso_is_url";
|
||||
|
@ -344,7 +344,11 @@ export default abstract class BasePlatform {
|
|||
{name: "AES-GCM", iv, additionalData}, cryptoKey, randomArray,
|
||||
);
|
||||
|
||||
await idbSave("pickleKey", [userId, deviceId], {encrypted, iv, cryptoKey});
|
||||
try {
|
||||
await idbSave("pickleKey", [userId, deviceId], {encrypted, iv, cryptoKey});
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
return encodeUnpaddedBase64(randomArray);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue