From aed6ba5a688b88a13c2bba1e7cde746be3e8525e Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Wed, 7 Aug 2024 10:12:50 +0700 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20button=20doesn=E2=80=99t=20work=20af?= =?UTF-8?q?ter=20using=203DS=20flow=20to=20add=20GBP=20payment=20card?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Subscription/CardAuthenticationModal/index.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx index 80cde4cb862c..c0bde6d9857f 100644 --- a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx +++ b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx @@ -6,11 +6,9 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; -import Navigation from '@libs/Navigation/Navigation'; import * as PaymentMethods from '@userActions/PaymentMethods'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; type CardAuthenticationModalProps = { /** Title shown in the header of the modal */ @@ -20,21 +18,12 @@ function CardAuthenticationModal({headerTitle}: CardAuthenticationModalProps) { const styles = useThemeStyles(); const [authenticationLink] = useOnyx(ONYXKEYS.VERIFY_3DS_SUBSCRIPTION); const [session] = useOnyx(ONYXKEYS.SESSION); - const [privateStripeCustomerID] = useOnyx(ONYXKEYS.NVP_PRIVATE_STRIPE_CUSTOMER_ID); const [isLoading, setIsLoading] = useState(true); const onModalClose = () => { PaymentMethods.clearPaymentCard3dsVerification(); }; - useEffect(() => { - if (privateStripeCustomerID?.status !== CONST.STRIPE_GBP_AUTH_STATUSES.SUCCEEDED) { - return; - } - PaymentMethods.clearPaymentCard3dsVerification(); - Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION); - }, [privateStripeCustomerID]); - const handleGBPAuthentication = useCallback( (event: MessageEvent) => { const message = event.data; From 287a6b3f6118c21ed482e55ebc474503398d91e9 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Mon, 26 Aug 2024 23:31:38 +0700 Subject: [PATCH 2/3] fix: don't navigate when close modal --- .../settings/Subscription/CardAuthenticationModal/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx index b6dee7ee82a5..a48386d4982b 100644 --- a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx +++ b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx @@ -26,7 +26,6 @@ function CardAuthenticationModal({headerTitle}: CardAuthenticationModalProps) { const onModalClose = useCallback(() => { setIsVisible(false); PaymentMethods.clearPaymentCard3dsVerification(); - Navigation.navigate(ROUTES.SETTINGS_SUBSCRIPTION); }, []); useEffect(() => { From 07bd8a1fcd24ea7e1f1b77be682ecbe9367c81d0 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Tue, 27 Aug 2024 10:22:58 +0700 Subject: [PATCH 3/3] fix: lint --- .../settings/Subscription/CardAuthenticationModal/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx index a48386d4982b..6f49e9bd0508 100644 --- a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx +++ b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx @@ -6,11 +6,9 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; -import Navigation from '@libs/Navigation/Navigation'; import * as PaymentMethods from '@userActions/PaymentMethods'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; type CardAuthenticationModalProps = { /** Title shown in the header of the modal */