Fix key backup not working without phrase

This commit is contained in:
Ajay Bura 2022-05-01 17:32:29 +05:30
parent 3fdd42706d
commit ba084c0a10

View file

@ -31,7 +31,7 @@ function SecretStorageAccess({ onComplete }) {
const processInput = async ({ key, phrase }) => {
setProcess(true);
try {
const { salt, iterations } = sSKeyInfo.passphrase;
const { salt, iterations } = sSKeyInfo.passphrase || {};
const privateKey = key
? mx.keyBackupKeyFromRecoveryKey(key)
: await deriveKey(phrase, salt, iterations);