From 8037fa57feeb78740a64809c28c5478f938ddbde Mon Sep 17 00:00:00 2001 From: Jeeva Ramachandran Date: Thu, 29 Feb 2024 18:32:22 +0530 Subject: [PATCH] fix: connector type --- src/screens/StripePlusPaypal/StripePlusPaypal.res | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/screens/StripePlusPaypal/StripePlusPaypal.res b/src/screens/StripePlusPaypal/StripePlusPaypal.res index d07e60c64..22add63d0 100644 --- a/src/screens/StripePlusPaypal/StripePlusPaypal.res +++ b/src/screens/StripePlusPaypal/StripePlusPaypal.res @@ -28,8 +28,8 @@ let make = () => { } let handleNavigation = async (~forward: bool) => { - if selectedConnector === Processors(STRIPE) { - if enums.paypalConnected.processorID->String.length === 0 { + switch selectedConnector { + | Processors(STRIPE) => if enums.paypalConnected.processorID->String.length === 0 { setSelectedConnector(_ => Processors(PAYPAL)) setConnectorConfigureState(_ => Configure_keys) setInitialValues(_ => Dict.make()->JSON.Encode.object) @@ -42,8 +42,7 @@ let make = () => { } }) } - } else { - setStepInView(_ => TEST_PAYMENT) + | _ => setStepInView(_ => TEST_PAYMENT) } }