diff --git a/src/client/initMatrix.ts b/src/client/initMatrix.ts index 6ac3e4f2..b64fa883 100644 --- a/src/client/initMatrix.ts +++ b/src/client/initMatrix.ts @@ -21,18 +21,21 @@ export const initClient = async (session: Session): Promise => { dbName: 'web-sync-store', }); + const legacyCryptoStore = new IndexedDBCryptoStore(global.indexedDB, 'crypto-store'); + const mx = createClient({ baseUrl: session.baseUrl, accessToken: session.accessToken, userId: session.userId, store: indexedDBStore, - cryptoStore: new IndexedDBCryptoStore(global.indexedDB, 'crypto-store'), + cryptoStore: legacyCryptoStore, deviceId: session.deviceId, timelineSupport: true, cryptoCallbacks: cryptoCallbacks as any, verificationMethods: ['m.sas.v1'], }); + await indexedDBStore.startup(); await mx.initRustCrypto(); mx.setGlobalErrorOnUnknownDevices(false);