From 092547bfc854ec6813f0488b1c44ebb7ac5f1547 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 17 Sep 2020 14:20:36 +0200 Subject: [PATCH] renaming --- src/matrix/e2ee/ssss/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix/e2ee/ssss/common.js b/src/matrix/e2ee/ssss/common.js index 6c708fed..2f70a4cb 100644 --- a/src/matrix/e2ee/ssss/common.js +++ b/src/matrix/e2ee/ssss/common.js @@ -82,10 +82,10 @@ export async function writeKey(storage, key) { } export async function readKey(txn) { - const key = await txn.session.get("ssssKey"); - if (!key) { + const keyData = await txn.session.get("ssssKey"); + if (!keyData) { return; } - const keyAccountData = await txn.accountData.get(`m.secret_storage.key.${key.id}`); - return new Key(new KeyDescription(key.id, keyAccountData), key.binaryKey); + const keyAccountData = await txn.accountData.get(`m.secret_storage.key.${keyData.id}`); + return new Key(new KeyDescription(keyData.id, keyAccountData), keyData.binaryKey); }