From 1c33196a5d71ff959a30120c27634db81d8920b8 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 19 Mar 2025 21:19:01 +0700 Subject: [PATCH] fix: User asked to again validate account after disabling 2FA --- src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx b/src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx index 873e384ece7e..9b1811f20edc 100644 --- a/src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx +++ b/src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx @@ -45,7 +45,7 @@ function CopyCodesPage({route}: TwoFactorAuthPageProps) { const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST); const [validateCodeAction] = useOnyx(ONYXKEYS.VALIDATE_ACTION_CODE); - const isUserValidated = account?.validated; + const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated}); const contactMethod = account?.primaryLogin ?? ''; const loginData = useMemo(() => loginList?.[contactMethod], [loginList, contactMethod]);