mirror of https://github.com/vector-im/riot-web
When trying to restore a keyback that has its key in 4S, check if 4S will be readable
If the account data for the 4S key is cleared or lost somehow, don't attempt to read the key and ask for the passphrase/recovery key instead, as doing so would trigger another bootstrap from the restore key backup dialog, overwriting the existing key backup.pull/21833/head
parent
4e623fa8c0
commit
40cabd2589
|
@ -243,8 +243,10 @@ export default class RestoreKeyBackupDialog extends React.PureComponent {
|
||||||
loadError: null,
|
loadError: null,
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
const backupInfo = await MatrixClientPeg.get().getKeyBackupVersion();
|
const cli = MatrixClientPeg.get();
|
||||||
const backupKeyStored = await MatrixClientPeg.get().isKeyBackupKeyStored();
|
const backupInfo = await cli.getKeyBackupVersion();
|
||||||
|
const has4S = await cli.hasSecretStorageKey();
|
||||||
|
const backupKeyStored = has4S && await cli.isKeyBackupKeyStored();
|
||||||
this.setState({
|
this.setState({
|
||||||
backupInfo,
|
backupInfo,
|
||||||
backupKeyStored,
|
backupKeyStored,
|
||||||
|
|
Loading…
Reference in New Issue