This commit is contained in:
Manav Rathi 2024-05-25 07:40:38 +05:30
parent 834b8f78b7
commit 79c0880c9c
No known key found for this signature in database

View file

@ -116,7 +116,6 @@ export async function encryptWithRecoveryKey(key: string) {
}
export const getRecoveryKey = async () => {
let recoveryKey: string = null;
try {
const cryptoWorker = await ComlinkCryptoWorker.getInstance();
@ -126,6 +125,7 @@ export const getRecoveryKey = async () => {
recoveryKeyDecryptionNonce,
} = keyAttributes;
const masterKey = await getActualKey();
let recoveryKey: string;
if (recoveryKeyEncryptedWithMasterKey) {
recoveryKey = await cryptoWorker.decryptB64(
recoveryKeyEncryptedWithMasterKey,