Fix key backup not working without phrase
authorAjay Bura <ajbura@gmail.com>
Sun, 1 May 2022 12:02:29 +0000 (17:32 +0530)
committerAjay Bura <ajbura@gmail.com>
Sun, 1 May 2022 12:02:29 +0000 (17:32 +0530)
src/app/organisms/settings/SecretStorageAccess.jsx

index f0131b14c8699cbf73e51d967bcbc923a4049692..9e53a3336aa617cf27dfc5d7b315a578dc943325 100644 (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);