diff --git a/src/domain/session/verification/DeviceVerificationViewModel.ts b/src/domain/session/verification/DeviceVerificationViewModel.ts index 7a9248f0..58debd28 100644 --- a/src/domain/session/verification/DeviceVerificationViewModel.ts +++ b/src/domain/session/verification/DeviceVerificationViewModel.ts @@ -75,9 +75,10 @@ export class DeviceVerificationViewModel extends ErrorReportViewModel { this.createViewModelAndEmit( new VerificationCancelledViewModel( - this.childOptions({ cancellationCode: cancellation!.code, cancelledByUs: cancellation!.cancelledByUs, }) - )); - })); + this.childOptions({ cancellation: cancellation! }) + ) + ); + })); this.track(this.sas.disposableOn("VerificationCompleted", (deviceId) => { this.createViewModelAndEmit( new VerificationCompleteViewModel(this.childOptions({ deviceId: deviceId! })) diff --git a/src/domain/session/verification/stages/VerificationCancelledViewModel.ts b/src/domain/session/verification/stages/VerificationCancelledViewModel.ts index 9f2bd180..01f11768 100644 --- a/src/domain/session/verification/stages/VerificationCancelledViewModel.ts +++ b/src/domain/session/verification/stages/VerificationCancelledViewModel.ts @@ -16,20 +16,20 @@ limitations under the License. import {ViewModel, Options as BaseOptions} from "../../../ViewModel"; import {SegmentType} from "../../../navigation/index"; -import {CancelReason} from "../../../../matrix/verification/SAS/channel/types"; +import type {CancelReason} from "../../../../matrix/verification/SAS/channel/types"; +import type {IChannel} from "../../../../matrix/verification/SAS/channel/Channel"; type Options = BaseOptions & { - cancellationCode: CancelReason; - cancelledByUs: boolean; + cancellation: IChannel["cancellation"]; }; export class VerificationCancelledViewModel extends ViewModel { get cancelCode(): CancelReason { - return this.options.cancellationCode; + return this.options.cancellation.code; } get isCancelledByUs(): boolean { - return this.options.cancelledByUs; + return this.options.cancellation.cancelledByUs; } gotoSettings() {