1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-06-06 12:11:16 +01:00
parent 6436fbb99f
commit 9fc557fc6b
2 changed files with 3 additions and 3 deletions

View File

@@ -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));
});
});
});

View File

@@ -1258,7 +1258,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
/**
* Implementation of {@link CryptoApi#exportSecretsBundle}.
*/
public async exportsSecretsBundle(): ReturnType<NonNullable<CryptoApi["exportSecretsBundle"]>> {
public async exportSecretsBundle(): ReturnType<NonNullable<CryptoApi["exportSecretsBundle"]>> {
const secretsBundle = await this.getOlmMachineOrThrow().exportSecretsBundle();
const secrets = secretsBundle.to_json();
secretsBundle.free();