diff --git a/mobile-app/app/login.tsx b/mobile-app/app/login.tsx index d0ec3dde6..d710340bc 100644 --- a/mobile-app/app/login.tsx +++ b/mobile-app/app/login.tsx @@ -89,7 +89,6 @@ export default function LoginScreen() { const loginResponse = await srpUtil.initiateLogin(credentials.username); - // Use requestAnimationFrame to ensure UI updates are smooth const passwordHash = await EncryptionUtility.deriveKeyFromPassword( credentials.password, loginResponse.salt, diff --git a/mobile-app/app/unlock.tsx b/mobile-app/app/unlock.tsx index 28377a94c..10fd498ba 100644 --- a/mobile-app/app/unlock.tsx +++ b/mobile-app/app/unlock.tsx @@ -13,7 +13,7 @@ import { SrpUtility } from '@/utils/SrpUtility'; import { useWebApi } from '@/context/WebApiContext'; export default function UnlockScreen() { - const { isLoggedIn, username, isFaceIDEnabled, returnPath } = useAuth(); + const { isLoggedIn, username, isFaceIDEnabled } = useAuth(); const { testDatabaseConnection } = useDb(); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); diff --git a/mobile-app/context/DbContext.tsx b/mobile-app/context/DbContext.tsx index 03eb35e97..26cd282d9 100644 --- a/mobile-app/context/DbContext.tsx +++ b/mobile-app/context/DbContext.tsx @@ -57,6 +57,9 @@ export const DbProvider: React.FC<{ children: React.ReactNode }> = ({ children } metadata ); + // Initialize the database in the native module + await unlockVault(); + setDbInitialized(true); setDbAvailable(true); }, []);