1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Pass SecretStorage into RustCrypto (#3353)

* Pass SecretStorage into RustCrypto

* Update src/rust-crypto/rust-crypto.ts
This commit is contained in:
Richard van der Hoff
2023-05-12 10:38:33 +01:00
committed by GitHub
parent ceb2a57feb
commit 40f2579158
4 changed files with 67 additions and 8 deletions

View File

@@ -2227,7 +2227,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
// importing rust-crypto will download the webassembly, so we delay it until we know it will be
// needed.
const RustCrypto = await import("./rust-crypto");
const rustCrypto = await RustCrypto.initRustCrypto(this.http, userId, deviceId);
const rustCrypto = await RustCrypto.initRustCrypto(this.http, userId, deviceId, this.secretStorage);
this.cryptoBackend = rustCrypto;
// attach the event listeners needed by RustCrypto