diff --git a/spec/unit/rust-crypto/rust-crypto.spec.ts b/spec/unit/rust-crypto/rust-crypto.spec.ts index a5a6c1654..966f25a5a 100644 --- a/spec/unit/rust-crypto/rust-crypto.spec.ts +++ b/spec/unit/rust-crypto/rust-crypto.spec.ts @@ -1531,7 +1531,7 @@ describe("RustCrypto", () => { }); it("should throw an error if there is nothing to export", async () => { - await expect(rustCrypto.exportsSecretsBundle()).rejects.toThrow( + await expect(rustCrypto.exportSecretsBundle()).rejects.toThrow( "The store doesn't contain any cross-signing keys", ); }); @@ -1550,7 +1550,7 @@ describe("RustCrypto", () => { }, }; await rustCrypto.importSecretsBundle(bundle); - await expect(rustCrypto.exportsSecretsBundle()).resolves.toEqual(expect.objectContaining(bundle)); + await expect(rustCrypto.exportSecretsBundle()).resolves.toEqual(expect.objectContaining(bundle)); }); }); }); diff --git a/src/rust-crypto/rust-crypto.ts b/src/rust-crypto/rust-crypto.ts index 61fc30cd9..a0a7f8323 100644 --- a/src/rust-crypto/rust-crypto.ts +++ b/src/rust-crypto/rust-crypto.ts @@ -1258,7 +1258,7 @@ export class RustCrypto extends TypedEventEmitter> { + public async exportSecretsBundle(): ReturnType> { const secretsBundle = await this.getOlmMachineOrThrow().exportSecretsBundle(); const secrets = secretsBundle.to_json(); secretsBundle.free();