Skip to content

Commit

Permalink
Use KeyBackup from rust crypto instead of IKeyBackup from legacy …
Browse files Browse the repository at this point in the history
…crypto
  • Loading branch information
florianduros committed Oct 31, 2024
1 parent ec3f6c9 commit e766fb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/integ/crypto/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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<IKeyBackup>((resolve) => {
const awaitKeyUploaded = new Promise<KeyBackup>((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,
Expand Down

0 comments on commit e766fb9

Please sign in to comment.