* Mock `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust`
* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.DeviceItem`
* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.DevicesSection`
* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.BasicUserInfo`
* Pass `isUserVerified` props to `BasicUserInfo` children
* Removed remaining calls to `checkUserTrust` in `UserInfo-test.tsx`
* Review changes
* Update comments
* Display spinner only when crypto is initialized
* Fix duplicate `cryptoEnabled`
* Remove misleading comment in `DevicesSection`
* Use new `CryptoEvent.VerificationRequestReceived` event
https://github.com/matrix-org/matrix-js-sdk/pull/3514 deprecates
`CryptoEvent.VerificationRequest` in favour of
`CryptoEvent.VerificationRequestReceived`. Use the new event.
* Factor out `getDeviceCryptoInfo` function
I seem to be writing this logic several times, so let's factor it out.
* Factor out `getUserDeviceIds` function
Another utility function
* VerificationRequestToast: `getStoredDevice` -> `getDeviceCryptoInfo`
* SlashCommands: `getStoredDevice` -> `getDeviceCryptoInfo`
* MemberTile: `getStoredDevicesForUser` -> `getUserDeviceIds`
* Remove redundant mock of `getStoredDevicesForUser`
* Inline `VerificationRequest.{invalid,ready,started,done,cancelled}`
These methods are all just shortcuts for checks on `phase`, so let's get rid of
them
* update test
* Add some more tests
* even more coverage
* fix tests
* Use `getUserDeviceInfo` instead of `downloadKeys` and `getStoredDevicesForUser`
* Use new `getUserDeviceInfo` api in `UserInfo.tsx` and `UserInfo-test.tsx`
* Fix missing fields
* Use `getUserDeviceInfo` instead of `downloadKeys`
* Move `ManualDeviceKeyVerificationDialog.tsx` from class to functional component and add tests
* Fix strict errors
* Update snapshot
* Add snapshot test to `UserInfo-test.tsx`
* Add test for <BasicUserInfo />
* Remove useless TODO comment
* Add test for ambiguous device
* Rework `<BasicUserInfo />` test
* unit test main paths in UserInfo component
Signed-off-by: Kerry Archibald <kerrya@element.io>
* one more test case
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove BasicUserInfo export
Signed-off-by: Kerry Archibald <kerrya@element.io>