1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Simplify isDeviceVerified definitions (#10594)

* Simplify `isDeviceVerified` definitions

Currently, we have two similar but different definitions of `isDeviceVerified`,
and they both do a lot of wrangling that relies on js-sdk internals. We can
simplify it a lot by just calling `MatrixClientPeg.checkDeviceTrust`.

* fix tests

* more test fixes
This commit is contained in:
Richard van der Hoff
2023-04-14 10:46:37 +01:00
committed by GitHub
parent e4ebcf5731
commit 70b87f8bde
8 changed files with 37 additions and 67 deletions

View File

@ -99,6 +99,7 @@ export function createTestClient(): MatrixClient {
getDevice: jest.fn(),
getDeviceId: jest.fn().mockReturnValue("ABCDEFGHI"),
getStoredCrossSigningForUser: jest.fn(),
checkDeviceTrust: jest.fn(),
getStoredDevice: jest.fn(),
requestVerification: jest.fn(),
deviceId: "ABCDEFGHI",