From 6cb65bb4a9c8c3652b9a26386a5910a9e09f6354 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 02:29:57 +0530 Subject: [PATCH] fix: resolve 4 bugs in AccountSafe --- frontend/src/features/vault/hooks/useExport.ts | 2 +- frontend/src/features/vault/hooks/useProfiles.ts | 2 ++ frontend/src/utils/encryption.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/vault/hooks/useExport.ts b/frontend/src/features/vault/hooks/useExport.ts index 6c294c0..b998be9 100644 --- a/frontend/src/features/vault/hooks/useExport.ts +++ b/frontend/src/features/vault/hooks/useExport.ts @@ -148,7 +148,7 @@ export function useExport(): UseExportReturn { */ const exportVault = useCallback(async (password: string, format: ExportFormat) => { // Validate inputs - if (!password || password.trim() === '') { + if (!password || password.trim().length === 0) { setError('Password is required'); setPhase('ERROR'); return; diff --git a/frontend/src/features/vault/hooks/useProfiles.ts b/frontend/src/features/vault/hooks/useProfiles.ts index 5aa4bd4..715af0a 100644 --- a/frontend/src/features/vault/hooks/useProfiles.ts +++ b/frontend/src/features/vault/hooks/useProfiles.ts @@ -607,3 +607,5 @@ export function useProfiles( } export default useProfiles; + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/frontend/src/utils/encryption.ts b/frontend/src/utils/encryption.ts index 9cd0d47..09e2313 100644 --- a/frontend/src/utils/encryption.ts +++ b/frontend/src/utils/encryption.ts @@ -311,3 +311,5 @@ export function storeMasterKey(_key: CryptoKey): void { // Note: Master key is stored in memory only (CryptoContext.tsx) } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file