From cf9fa991d197b8796545a7c03f743bcdac9cdfe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 10 Sep 2021 19:18:19 +0200 Subject: [PATCH] Add ISasEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/crypto/verification/SAS.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/crypto/verification/SAS.ts b/src/crypto/verification/SAS.ts index a7d6797871c..9ec4756d8d0 100644 --- a/src/crypto/verification/SAS.ts +++ b/src/crypto/verification/SAS.ts @@ -160,6 +160,13 @@ export interface IGeneratedSas { emoji?: EmojiMapping[]; } +export interface ISasEvent { + sas: IGeneratedSas; + confirm(): Promise; + cancel(): void; + mismatch(): void; +} + function generateSas(sasBytes: number[], methods: string[]): IGeneratedSas { const sas: IGeneratedSas = {}; for (const method of methods) { @@ -232,12 +239,7 @@ export class SAS extends Base { private waitingForAccept: boolean; public ourSASPubKey: string; public theirSASPubKey: string; - public sasEvent: { - sas: IGeneratedSas; - confirm(): Promise; - cancel(): void; - mismatch(): void; - }; + public sasEvent: ISasEvent; // eslint-disable-next-line @typescript-eslint/naming-convention public static get NAME(): string {