1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00
This commit is contained in:
David Baker
2018-11-20 16:17:58 +00:00
parent cb51799246
commit 6047838f53

View File

@@ -875,9 +875,8 @@ MatrixClient.prototype.prepareKeyBackupVersion = async function(password) {
const decryption = new global.Olm.PkDecryption(); const decryption = new global.Olm.PkDecryption();
try { try {
let privateKey;
let publicKey; let publicKey;
let authData = {}; const authData = {};
if (password) { if (password) {
const keyInfo = await keyForNewBackup(password); const keyInfo = await keyForNewBackup(password);
publicKey = decryption.init_with_private_key(keyInfo.key); publicKey = decryption.init_with_private_key(keyInfo.key);