Skip to content

Commit

Permalink
Add missing awaits in bootstrap path
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans committed Mar 30, 2020
1 parent 223d37f commit d2ba303
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ Crypto.prototype.bootstrapSecretStorage = async function({
newKeyId = await this.addSecretStorageKey(
SECRET_STORAGE_ALGORITHM_V1_AES, opts,
);
this.setDefaultSecretStorageKeyId(newKeyId);
await this.setDefaultSecretStorageKeyId(newKeyId);
// use the backup key as the new ssss key
ssssKeys[newKeyId] = backupKey;
}
Expand Down Expand Up @@ -690,7 +690,7 @@ Crypto.prototype.bootstrapSecretStorage = async function({
const sessionBackupKey = await this.getSecret('m.megolm_backup.v1');
if (sessionBackupKey) {
logger.info("Got session backup key from secret storage: caching");
this.storeSessionBackupPrivateKey(sessionBackupKey);
await this.storeSessionBackupPrivateKey(sessionBackupKey);
}

if (setupNewKeyBackup && !keyBackupInfo) {
Expand Down

0 comments on commit d2ba303

Please sign in to comment.