Replace `IBootstrapCrossSigningOpts` by `BootstrapCrossSigningOpts` to use CryptoApi type instead of old crypto type. (#28263)

pull/28268/head
Florian Duros 2024-10-22 11:18:30 +02:00 committed by GitHub
parent 4a1f86f273
commit 1ec2f9261f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -7,10 +7,9 @@ Please see LICENSE files in the repository root for full details.
*/ */
import { mocked, Mocked } from "jest-mock"; import { mocked, Mocked } from "jest-mock";
import { IBootstrapCrossSigningOpts } from "matrix-js-sdk/src/crypto";
import { MatrixClient, Device } from "matrix-js-sdk/src/matrix"; import { MatrixClient, Device } from "matrix-js-sdk/src/matrix";
import { SecretStorageKeyDescriptionAesV1, ServerSideSecretStorage } from "matrix-js-sdk/src/secret-storage"; import { SecretStorageKeyDescriptionAesV1, ServerSideSecretStorage } from "matrix-js-sdk/src/secret-storage";
import { CryptoApi, DeviceVerificationStatus } from "matrix-js-sdk/src/crypto-api"; import { BootstrapCrossSigningOpts, CryptoApi, DeviceVerificationStatus } from "matrix-js-sdk/src/crypto-api";
import { SdkContextClass } from "../../../src/contexts/SDKContext"; import { SdkContextClass } from "../../../src/contexts/SDKContext";
import { accessSecretStorage } from "../../../src/SecurityManager"; import { accessSecretStorage } from "../../../src/SecurityManager";
@ -162,7 +161,7 @@ describe("SetupEncryptionStore", () => {
it("resetConfirm should work with a cached account password", async () => { it("resetConfirm should work with a cached account password", async () => {
const makeRequest = jest.fn(); const makeRequest = jest.fn();
mockCrypto.bootstrapCrossSigning.mockImplementation(async (opts: IBootstrapCrossSigningOpts) => { mockCrypto.bootstrapCrossSigning.mockImplementation(async (opts: BootstrapCrossSigningOpts) => {
await opts?.authUploadDeviceSigningKeys?.(makeRequest); await opts?.authUploadDeviceSigningKeys?.(makeRequest);
}); });
mocked(accessSecretStorage).mockImplementation(async (func?: () => Promise<void>) => { mocked(accessSecretStorage).mockImplementation(async (func?: () => Promise<void>) => {