Show error on wrong security key
authorAjay Bura <ajbura@gmail.com>
Sun, 1 May 2022 12:10:47 +0000 (17:40 +0530)
committerAjay Bura <ajbura@gmail.com>
Sun, 1 May 2022 12:10:47 +0000 (17:40 +0530)
src/app/organisms/settings/SecretStorageAccess.jsx

index 9e53a3336aa617cf27dfc5d7b315a578dc943325..e4fceb078e11be65f4377511fc8a692b4dbbc2a4 100644 (file)
@@ -24,11 +24,11 @@ function SecretStorageAccess({ onComplete }) {
   const [process, setProcess] = useState(false);
   const [error, setError] = useState(null);
   const mountStore = useStore();
-  mountStore.setItem(true);
 
   const toggleWithPhrase = () => setWithPhrase(!withPhrase);
 
   const processInput = async ({ key, phrase }) => {
+    mountStore.setItem(true);
     setProcess(true);
     try {
       const { salt, iterations } = sSKeyInfo.passphrase || {};