First batch: remove deprecated calls on MatrixClient
(#28207)
* Remove `initCrypto` mocking * Remove `MatrixClient.downloadKeys` mocking * Remove `MatrixClient.getStoredDevice` mocking * Replace `MatrixClient.setGlobalBlacklistUnverifiedDevices` by `MatrixClient.CryptoApi.globalBlacklistUnverifiedDevices` * Remove `MatrixClient.getStoredCrossSigningForUser` mocking * Replace `MatrixClient.legacyDeviceVerification` by `MatrixClient.CryptoApi.requestDeviceVerification` * Remove `MatrixClient.isCrossSigningReady` mock * Replace `MatrixClient.bootstrapCrossSigning` by `MatrixClient.getCrypto.bootstrapCrossSigning` * Replace `MatrixClient.getCryptoTrustCrossSignedDevices` by `MatrixClient.getCrypto.getTrustCrossSignedDevices` * Replace `MatrixClient.hasSecretStorageKey` by `MatrixClient.SecretStorage.hasKey` * Replace `MatrixClient.getDefaultSecretStorageKeyId` by `MatrixClient.SecretStorage.getDefaultKeyId` * Remove `MatrixClient.encryptAndSendToDevices` call
This commit is contained in:
parent
26a98e5e30
commit
46d13921d0
17 changed files with 22 additions and 55 deletions
|
@ -141,10 +141,8 @@ export const mockClientMethodsDevice = (
|
|||
export const mockClientMethodsCrypto = (): Partial<
|
||||
Record<MethodLikeKeys<MatrixClient> & PropertyLikeKeys<MatrixClient>, unknown>
|
||||
> => ({
|
||||
isCrossSigningReady: jest.fn(),
|
||||
isKeyBackupKeyStored: jest.fn(),
|
||||
getCrossSigningCacheCallbacks: jest.fn().mockReturnValue({ getCrossSigningKeyCache: jest.fn() }),
|
||||
getStoredCrossSigningForUser: jest.fn(),
|
||||
getKeyBackupVersion: jest.fn().mockResolvedValue(null),
|
||||
secretStorage: { hasKey: jest.fn() },
|
||||
getCrypto: jest.fn().mockReturnValue({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue