diff --git a/src/domain/session/verification/DeviceVerificationViewModel.ts b/src/domain/session/verification/DeviceVerificationViewModel.ts index bb81fa9c..2f051745 100644 --- a/src/domain/session/verification/DeviceVerificationViewModel.ts +++ b/src/domain/session/verification/DeviceVerificationViewModel.ts @@ -64,8 +64,9 @@ export class DeviceVerificationViewModel extends ErrorReportViewModel { - const crossSigning = this.getOption("session").crossSigning.get(); + await this.logAndCatch("DeviceVerificationViewModel.startVerification", async (log) => { + const crossSigningObservable = this.getOption("session").crossSigning; + const crossSigning = await crossSigningObservable.waitFor(c => !!c).promise; this.sas = crossSigning.startVerification(requestOrUserId, room, log); if (!this.sas) { throw new Error("CrossSigning.startVerification did not return a sas object!");