Merge pull request #4703 from matrix-org/bwindels/preventbootstrapfromkeybackuprestore-rc

Prevent (double) 4S bootstrap from RestoreKeyBackupDialog
pull/21833/head
Bruno Windels 2020-06-04 12:37:48 +00:00 committed by GitHub
commit 737c31a54c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -243,8 +243,10 @@ export default class RestoreKeyBackupDialog extends React.PureComponent {
loadError: null,
});
try {
const backupInfo = await MatrixClientPeg.get().getKeyBackupVersion();
const backupKeyStored = await MatrixClientPeg.get().isKeyBackupKeyStored();
const cli = MatrixClientPeg.get();
const backupInfo = await cli.getKeyBackupVersion();
const has4S = await cli.hasSecretStorageKey();
const backupKeyStored = has4S && await cli.isKeyBackupKeyStored();
this.setState({
backupInfo,
backupKeyStored,