parent
0efd599014
commit
3fffbb0845
|
@ -27,6 +27,7 @@ import VerificationShowSas from "../verification/VerificationShowSas";
|
||||||
import BaseDialog from "./BaseDialog";
|
import BaseDialog from "./BaseDialog";
|
||||||
import DialogButtons from "../elements/DialogButtons";
|
import DialogButtons from "../elements/DialogButtons";
|
||||||
import { IDialogProps } from "./IDialogProps";
|
import { IDialogProps } from "./IDialogProps";
|
||||||
|
import { IGeneratedSas, ISasEvent } from "matrix-js-sdk/src/crypto/verification/SAS";
|
||||||
|
|
||||||
const PHASE_START = 0;
|
const PHASE_START = 0;
|
||||||
const PHASE_SHOW_SAS = 1;
|
const PHASE_SHOW_SAS = 1;
|
||||||
|
@ -47,12 +48,12 @@ interface IState {
|
||||||
displayname?: string;
|
displayname?: string;
|
||||||
};
|
};
|
||||||
opponentProfileError: Error;
|
opponentProfileError: Error;
|
||||||
sas: any; // TODO types
|
sas: IGeneratedSas;
|
||||||
}
|
}
|
||||||
|
|
||||||
@replaceableComponent("views.dialogs.IncomingSasDialog")
|
@replaceableComponent("views.dialogs.IncomingSasDialog")
|
||||||
export default class IncomingSasDialog extends React.Component<IProps, IState> {
|
export default class IncomingSasDialog extends React.Component<IProps, IState> {
|
||||||
private showSasEvent: any; // TODO: Types
|
private showSasEvent: ISasEvent;
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -115,8 +116,7 @@ export default class IncomingSasDialog extends React.Component<IProps, IState> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Types
|
private onVerifierShowSas = (e: ISasEvent): void => {
|
||||||
private onVerifierShowSas = (e): void => {
|
|
||||||
this.showSasEvent = e;
|
this.showSasEvent = e;
|
||||||
this.setState({
|
this.setState({
|
||||||
phase: PHASE_SHOW_SAS,
|
phase: PHASE_SHOW_SAS,
|
||||||
|
@ -124,8 +124,7 @@ export default class IncomingSasDialog extends React.Component<IProps, IState> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Types
|
private onVerifierCancel = (): void => {
|
||||||
private onVerifierCancel = (e): void => {
|
|
||||||
this.setState({
|
this.setState({
|
||||||
phase: PHASE_CANCELLED,
|
phase: PHASE_CANCELLED,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue