Remove references to matrix-js-sdk/src/crypto/verification (#12365)

All this stuff is deprecated and has better alternatives now.
This commit is contained in:
Richard van der Hoff 2024-03-25 17:44:45 +00:00 committed by GitHub
parent ef2bd7ae04
commit 157ca48dff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 35 deletions

View file

@ -17,8 +17,13 @@ limitations under the License.
import { type Page, expect, JSHandle } from "@playwright/test";
import type { CryptoEvent, ICreateRoomOpts, MatrixClient } from "matrix-js-sdk/src/matrix";
import type { VerificationRequest, Verifier, EmojiMapping, VerifierEvent } from "matrix-js-sdk/src/crypto-api";
import type { ISasEvent } from "matrix-js-sdk/src/crypto/verification/SAS";
import type {
VerificationRequest,
Verifier,
EmojiMapping,
VerifierEvent,
ShowSasCallbacks,
} from "matrix-js-sdk/src/crypto-api";
import { Credentials, HomeserverInstance } from "../../plugins/homeserver";
import { Client } from "../../pages/client";
import { ElementAppPage } from "../../pages/ElementAppPage";
@ -58,7 +63,7 @@ export function handleSasVerification(verifier: JSHandle<Verifier>): Promise<Emo
if (event) return event.sas.emoji;
return new Promise<EmojiMapping[]>((resolve) => {
const onShowSas = (event: ISasEvent) => {
const onShowSas = (event: ShowSasCallbacks) => {
verifier.off("show_sas" as VerifierEvent, onShowSas);
event.confirm();
resolve(event.sas.emoji);