You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
@@ -1531,7 +1531,7 @@ describe("RustCrypto", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should throw an error if there is nothing to export", async () => {
|
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",
|
"The store doesn't contain any cross-signing keys",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -1550,7 +1550,7 @@ describe("RustCrypto", () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
await rustCrypto.importSecretsBundle(bundle);
|
await rustCrypto.importSecretsBundle(bundle);
|
||||||
await expect(rustCrypto.exportsSecretsBundle()).resolves.toEqual(expect.objectContaining(bundle));
|
await expect(rustCrypto.exportSecretsBundle()).resolves.toEqual(expect.objectContaining(bundle));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1258,7 +1258,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
|
|||||||
/**
|
/**
|
||||||
* Implementation of {@link CryptoApi#exportSecretsBundle}.
|
* 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 secretsBundle = await this.getOlmMachineOrThrow().exportSecretsBundle();
|
||||||
const secrets = secretsBundle.to_json();
|
const secrets = secretsBundle.to_json();
|
||||||
secretsBundle.free();
|
secretsBundle.free();
|
||||||
|
|||||||
Reference in New Issue
Block a user