Skip to content

Commit 85014e5

Browse files
committed
Fix the logic for showing required 2fa page
1 parent 31b025f commit 85014e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/hooks/useOnboardingFlow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function useOnboardingFlowRouter() {
4949
const [isSingleNewDotEntry, isSingleNewDotEntryMetadata] = useOnyx(ONYXKEYS.HYBRID_APP, {selector: isSingleNewDotEntrySelector, canBeMissing: true});
5050
const {typeMenuSections} = useSearchTypeMenuSections();
5151
const shouldShowRequire2FAPage = useMemo(
52-
() => !!account?.needsTwoFactorAuthSetup && (!account?.requiresTwoFactorAuth || !!account?.twoFactorAuthSetupInProgress),
53-
[account?.needsTwoFactorAuthSetup, account?.requiresTwoFactorAuth, account?.twoFactorAuthSetupInProgress],
52+
() => (!!account?.needsTwoFactorAuthSetup && !account?.requiresTwoFactorAuth) || (!!account?.twoFactorAuthSetupInProgress && !hasCompletedGuidedSetupFlowSelector(onboardingValues)),
53+
[account?.needsTwoFactorAuthSetup, account?.requiresTwoFactorAuth, account?.twoFactorAuthSetupInProgress, onboardingValues],
5454
);
5555

5656
useEffect(() => {

0 commit comments

Comments
 (0)