diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index 0773a8d32d..085764214f 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -107,7 +107,7 @@ export async function accessSecretStorage(func = async () => { }) { cachingAllowed = true; try { - if (!cli.hasSecretStorageKey()) { + if (!await cli.hasSecretStorageKey()) { // This dialog calls bootstrap itself after guiding the user through // passphrase creation. const { finished } = Modal.createTrackedDialogAsync('Create Secret Storage dialog', '', diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index 2b191454f6..49046cd051 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -60,14 +60,14 @@ export default class CrossSigningPanel extends React.PureComponent { this.setState(this._getUpdatedStatus()); }; - _getUpdatedStatus() { + async _getUpdatedStatus() { // XXX: Add public accessors if we keep this around in production const cli = MatrixClientPeg.get(); const crossSigning = cli._crypto._crossSigningInfo; const secretStorage = cli._crypto._secretStorage; const crossSigningPublicKeysOnDevice = crossSigning.getId(); - const crossSigningPrivateKeysInStorage = crossSigning.isStoredInSecretStorage(secretStorage); - const secretStorageKeyInAccount = secretStorage.hasKey(); + const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage); + const secretStorageKeyInAccount = await secretStorage.hasKey(); return { crossSigningPublicKeysOnDevice,