Conform more of the codebase to strict types (#11191)
This commit is contained in:
parent
4044c2aa66
commit
8107f1d271
25 changed files with 88 additions and 57 deletions
|
@ -20,10 +20,11 @@ import FileSaver from "file-saver";
|
|||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";
|
||||
import { TrustInfo } from "matrix-js-sdk/src/crypto/backup";
|
||||
import { CrossSigningKeys, MatrixError, UIAFlow } from "matrix-js-sdk/src/matrix";
|
||||
import { CrossSigningKeys, IAuthDict, MatrixError, UIAFlow } from "matrix-js-sdk/src/matrix";
|
||||
import { IRecoveryKey } from "matrix-js-sdk/src/crypto/api";
|
||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
|
||||
import classNames from "classnames";
|
||||
import { UIAResponse } from "matrix-js-sdk/src/@types/uia";
|
||||
|
||||
import { MatrixClientPeg } from "../../../../MatrixClientPeg";
|
||||
import { _t, _td } from "../../../../languageHandler";
|
||||
|
@ -90,7 +91,7 @@ interface IState {
|
|||
accountPasswordCorrect: boolean | null;
|
||||
canSkip: boolean;
|
||||
passPhraseKeySelected: string;
|
||||
error?: string;
|
||||
error?: boolean;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -279,7 +280,9 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
|
|||
});
|
||||
};
|
||||
|
||||
private doBootstrapUIAuth = async (makeRequest: (authData: any) => Promise<{}>): Promise<void> => {
|
||||
private doBootstrapUIAuth = async (
|
||||
makeRequest: (authData: IAuthDict) => Promise<UIAResponse<void>>,
|
||||
): Promise<void> => {
|
||||
if (this.state.canUploadKeysWithPasswordOnly && this.state.accountPassword) {
|
||||
await makeRequest({
|
||||
type: "m.login.password",
|
||||
|
@ -385,7 +388,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
|
|||
phase: Phase.Migrate,
|
||||
});
|
||||
} else {
|
||||
this.setState({ error: e });
|
||||
this.setState({ error: true });
|
||||
}
|
||||
logger.error("Error bootstrapping secret storage", e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue