From f58a3ee975debb8618a976fb91be0569ba5e7697 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 17 Sep 2020 18:56:02 +0200 Subject: [PATCH] use olm from param --- src/matrix/ssss/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/ssss/index.js b/src/matrix/ssss/index.js index 9918da7a..cc1469e3 100644 --- a/src/matrix/ssss/index.js +++ b/src/matrix/ssss/index.js @@ -47,7 +47,7 @@ export async function readKey(txn) { return new Key(new KeyDescription(keyData.id, keyAccountData), keyData.binaryKey); } -export async function keyFromCredential(type, credential, storage, cryptoDriver) { +export async function keyFromCredential(type, credential, storage, cryptoDriver, olm) { const keyDescription = await readDefaultKeyDescription(storage); if (!keyDescription) { throw new Error("Could not find any secret storage key in account data"); @@ -56,7 +56,7 @@ export async function keyFromCredential(type, credential, storage, cryptoDriver) if (type === "passphrase") { key = await keyFromPassphrase(keyDescription, credential, cryptoDriver); } else if (type === "recoverykey") { - key = keyFromRecoveryKey(this._olm, keyDescription, credential); + key = keyFromRecoveryKey(olm, keyDescription, credential); } else { throw new Error(`Invalid type: ${type}`); }