From bffe34fe0a4e4b02629cc758426c855813caf62f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 3 Nov 2021 02:20:27 +0100 Subject: [PATCH] await write key --- src/matrix/Session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/Session.js b/src/matrix/Session.js index 04e2bd62..37fd90ad 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -206,7 +206,7 @@ export class Session { this._storage.storeNames.accountData, ]); await this._createSessionBackup(key, readTxn); - this._writeSSSSKey(key); + await this._writeSSSSKey(key); this._hasSecretStorageKey.set(true); return key; } @@ -441,7 +441,7 @@ export class Session { const ssssKey = await createSSSSKeyFromDehydratedDeviceKey(dehydratedDevice.key, this._storage, this._platform); if (ssssKey) { log.set("success", true); - this._writeSSSSKey(ssssKey); + await this._writeSSSSKey(ssssKey); } }) }