From e766fb9b2492fe3a185080b90d01d4f7104e2622 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Thu, 31 Oct 2024 14:06:40 +0100 Subject: [PATCH] Use `KeyBackup` from rust crypto instead of `IKeyBackup` from legacy crypto --- spec/integ/crypto/crypto.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/integ/crypto/crypto.spec.ts b/spec/integ/crypto/crypto.spec.ts index 3d62413c33f..7f8182f74f2 100644 --- a/spec/integ/crypto/crypto.spec.ts +++ b/spec/integ/crypto/crypto.spec.ts @@ -91,7 +91,6 @@ import { OnlySignedDevicesIsolationMode, } from "../../../src/crypto-api"; import { E2EKeyResponder } from "../../test-utils/E2EKeyResponder"; -import { IKeyBackup } from "../../../src/crypto/backup"; import { createOlmAccount, createOlmSession, @@ -106,6 +105,7 @@ import { ToDevicePayload } from "../../../src/models/ToDeviceMessage"; import { AccountDataAccumulator } from "../../test-utils/AccountDataAccumulator"; import { UNSIGNED_MEMBERSHIP_FIELD } from "../../../src/@types/event"; import { KnownMembership } from "../../../src/@types/membership"; +import { KeyBackup } from "../../../src/rust-crypto/backup.ts"; afterEach(() => { // reset fake-indexeddb after each test, to make sure we don't leak connections @@ -3138,11 +3138,11 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string, // Import a new key that should be uploaded const newKey = testData.MEGOLM_SESSION_DATA; - const awaitKeyUploaded = new Promise((resolve) => { + const awaitKeyUploaded = new Promise((resolve) => { fetchMock.put( "path:/_matrix/client/v3/room_keys/keys", (url, request) => { - const uploadPayload: IKeyBackup = JSON.parse(request.body?.toString() ?? "{}"); + const uploadPayload: KeyBackup = JSON.parse(request.body?.toString() ?? "{}"); resolve(uploadPayload); return { status: 200,