Remove property

This commit is contained in:
RMidhunSuresh 2023-03-28 17:55:40 +05:30
parent 6fefc1549e
commit b2d6a78365

View File

@ -32,26 +32,24 @@ type Options = BaseOptions & {
}; };
export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentType, Options> { export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentType, Options> {
private session: Session;
private sas: SASVerification; private sas: SASVerification;
private _currentStageViewModel: any; private _currentStageViewModel: any;
constructor(options: Readonly<Options>) { constructor(options: Readonly<Options>) {
super(options); super(options);
this.session = options.session;
const sasRequest = options.request; const sasRequest = options.request;
if (options.request) { if (options.request) {
this.start(sasRequest); this.start(sasRequest);
} }
else { else {
// We are about to send the request // We are about to send the request
this.start(this.session.userId); this.start(this.getOption("session").userId);
} }
} }
private async start(requestOrUserId: SASRequest | string) { private async start(requestOrUserId: SASRequest | string) {
await this.logAndCatch("DeviceVerificationViewModel.start", (log) => { await this.logAndCatch("DeviceVerificationViewModel.start", (log) => {
const crossSigning = this.session.crossSigning.get(); const crossSigning = this.getOption("session").crossSigning.get();
this.sas = crossSigning.startVerification(requestOrUserId, log); this.sas = crossSigning.startVerification(requestOrUserId, log);
this.addEventListeners(); this.addEventListeners();
if (typeof requestOrUserId === "string") { if (typeof requestOrUserId === "string") {