1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-07 23:02:56 +03:00

Remove remaining legacy crypto imports in new crypto and tests (#4491)

* Use `CryptoCallbacks` from `CryptoApi` instead of legacy crypto.

* Use `KeyBackup` from rust crypto instead of `IKeyBackup` from legacy crypto
This commit is contained in:
Florian Duros
2024-11-04 09:55:32 +01:00
committed by GitHub
parent 6528a59fc1
commit 1061b93b29
3 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,6 @@ import { StoreHandle } from "@matrix-org/matrix-sdk-crypto-wasm";
import { RustCrypto } from "./rust-crypto.ts";
import { IHttpOpts, MatrixHttpApi } from "../http-api/index.ts";
import { ServerSideSecretStorage } from "../secret-storage.ts";
import { ICryptoCallbacks } from "../crypto/index.ts";
import { Logger } from "../logger.ts";
import { CryptoStore, MigrationState } from "../crypto/store/base.ts";
import {
@@ -28,6 +27,7 @@ import {
migrateLegacyLocalTrustIfNeeded,
migrateRoomSettingsFromLegacyCrypto,
} from "./libolm_migration.ts";
import { CryptoCallbacks } from "../crypto-api/index.ts";
/**
* Create a new `RustCrypto` implementation
@@ -55,7 +55,7 @@ export async function initRustCrypto(args: {
secretStorage: ServerSideSecretStorage;
/** Crypto callbacks provided by the application. */
cryptoCallbacks: ICryptoCallbacks;
cryptoCallbacks: CryptoCallbacks;
/**
* The prefix to use on the indexeddbs created by rust-crypto.
@@ -145,7 +145,7 @@ async function initOlmMachine(
userId: string,
deviceId: string,
secretStorage: ServerSideSecretStorage,
cryptoCallbacks: ICryptoCallbacks,
cryptoCallbacks: CryptoCallbacks,
storeHandle: StoreHandle,
legacyCryptoStore?: CryptoStore,
): Promise<RustCrypto> {