From c265d421b78dcc340722ff2390924ace5812a654 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Tue, 3 Mar 2026 04:20:04 -0800 Subject: [PATCH 1/2] Use AuthorizeTransaction.allowedAuthenticationMethods directly in useNavigateTo3DSAuthorizationChallenge --- .../Navigation/useNavigateTo3DSAuthorizationChallenge.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts b/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts index c3221625747a..d98f642ff56d 100644 --- a/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts +++ b/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts @@ -10,6 +10,7 @@ import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {TransactionPending3DSReview} from '@src/types/onyx'; import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue'; +import AuthorizeTransaction from '@components/MultifactorAuthentication/config/scenarios/AuthorizeTransaction'; import Navigation, {isMFAFlowScreen} from './Navigation'; // We want predictable, stable ordering for transaction challenges to ensure we don't @@ -99,12 +100,9 @@ function useNavigateTo3DSAuthorizationChallenge() { return; } - // Note: Importing AuthorizeTransaction in this file causes the browser to get stuck in an infinite reload loop - // Issue to fix this: https://github.com/Expensify/App/issues/83021 - // TODO: when adding Passkey support, update this list and the switch below. + // TODO: when adding Passkey support, update the switch-case below. // Passkey issue: https://github.com/expensify/app/issues/79470 - const allowedAuthenticationMethods = [CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS]; - const doesDeviceSupportAnAllowedAuthenticationMethod = allowedAuthenticationMethods.some((method) => { + const doesDeviceSupportAnAllowedAuthenticationMethod = AuthorizeTransaction.allowedAuthenticationMethods.some((method) => { switch (method) { case CONST.MULTIFACTOR_AUTHENTICATION.TYPE.BIOMETRICS: return doesDeviceSupportBiometrics(); From e8007d22b3f9fd6b0006b54f873bfd9c831b14eb Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Tue, 3 Mar 2026 04:45:05 -0800 Subject: [PATCH 2/2] Fix prettier and spellcheck --- src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts b/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts index d98f642ff56d..723c9a2d5977 100644 --- a/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts +++ b/src/libs/Navigation/useNavigateTo3DSAuthorizationChallenge.ts @@ -1,5 +1,6 @@ import {findFocusedRoute} from '@react-navigation/native'; import {useEffect, useMemo} from 'react'; +import AuthorizeTransaction from '@components/MultifactorAuthentication/config/scenarios/AuthorizeTransaction'; import useNativeBiometrics from '@components/MultifactorAuthentication/Context/useNativeBiometrics'; import useOnyx from '@hooks/useOnyx'; import useRootNavigationState from '@hooks/useRootNavigationState'; @@ -10,7 +11,6 @@ import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {TransactionPending3DSReview} from '@src/types/onyx'; import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue'; -import AuthorizeTransaction from '@components/MultifactorAuthentication/config/scenarios/AuthorizeTransaction'; import Navigation, {isMFAFlowScreen} from './Navigation'; // We want predictable, stable ordering for transaction challenges to ensure we don't @@ -126,7 +126,7 @@ function useNavigateTo3DSAuthorizationChallenge() { // the old value and react will run a second effect with the new value. Typescript doesn't know that Onyx treats the object as // immutable, so we must guard against transactionID becoming undefined again, even though we know it won't be. if (!transactionPending3DSReview?.transactionID) { - Log.info('[useNavigateTo3DSAuthorizationChallenge] Ignoring navigation - typeguard bail-out (should be impossible to reach)'); + Log.info('[useNavigateTo3DSAuthorizationChallenge] Ignoring navigation - type guard bail-out (should be impossible to reach)'); return; }