mirror of https://github.com/vector-im/riot-web
One less try/catch
parent
106de5f7ba
commit
72a9bda3b7
|
@ -225,7 +225,6 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
||||||
try {
|
try {
|
||||||
// Force reset secret storage (which resets the key backup)
|
// Force reset secret storage (which resets the key backup)
|
||||||
await accessSecretStorage(async () => {
|
await accessSecretStorage(async () => {
|
||||||
try {
|
|
||||||
// Now reset cross-signing so everything Just Works™ again.
|
// Now reset cross-signing so everything Just Works™ again.
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
await cli.bootstrapCrossSigning({
|
await cli.bootstrapCrossSigning({
|
||||||
|
@ -251,10 +250,6 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
||||||
// Now we can indicate that the user is done pressing buttons, finally.
|
// Now we can indicate that the user is done pressing buttons, finally.
|
||||||
// Upstream flows will detect the new secret storage, key backup, etc and use it.
|
// Upstream flows will detect the new secret storage, key backup, etc and use it.
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
this.props.onFinished(false);
|
|
||||||
}
|
|
||||||
}, true);
|
}, true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in New Issue