From 3fffbb084537635b5897b9b1ba0bbc272724259d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 10 Sep 2021 19:19:29 +0200 Subject: [PATCH] Use ISasEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/dialogs/IncomingSasDialog.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/views/dialogs/IncomingSasDialog.tsx b/src/components/views/dialogs/IncomingSasDialog.tsx index 0c689e198d..e81a233055 100644 --- a/src/components/views/dialogs/IncomingSasDialog.tsx +++ b/src/components/views/dialogs/IncomingSasDialog.tsx @@ -27,6 +27,7 @@ import VerificationShowSas from "../verification/VerificationShowSas"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; import { IDialogProps } from "./IDialogProps"; +import { IGeneratedSas, ISasEvent } from "matrix-js-sdk/src/crypto/verification/SAS"; const PHASE_START = 0; const PHASE_SHOW_SAS = 1; @@ -47,12 +48,12 @@ interface IState { displayname?: string; }; opponentProfileError: Error; - sas: any; // TODO types + sas: IGeneratedSas; } @replaceableComponent("views.dialogs.IncomingSasDialog") export default class IncomingSasDialog extends React.Component { - private showSasEvent: any; // TODO: Types + private showSasEvent: ISasEvent; constructor(props: IProps) { super(props); @@ -115,8 +116,7 @@ export default class IncomingSasDialog extends React.Component { }); }; - // TODO: Types - private onVerifierShowSas = (e): void => { + private onVerifierShowSas = (e: ISasEvent): void => { this.showSasEvent = e; this.setState({ phase: PHASE_SHOW_SAS, @@ -124,8 +124,7 @@ export default class IncomingSasDialog extends React.Component { }); }; - // TODO: Types - private onVerifierCancel = (e): void => { + private onVerifierCancel = (): void => { this.setState({ phase: PHASE_CANCELLED, });