From 5b107f9d12c704fdbe599d24614bb90f554b2a64 Mon Sep 17 00:00:00 2001 From: ArushKapoorJuspay <121166031+ArushKapoorJuspay@users.noreply.github.com> Date: Fri, 22 Dec 2023 01:24:01 +0530 Subject: [PATCH] fix: HS-132: Added RequiredFieldsBody in useEffect for eventListener (#82) --- src/Payments/ApplePay.res | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Payments/ApplePay.res b/src/Payments/ApplePay.res index 1af342c78..3b33a19c3 100644 --- a/src/Payments/ApplePay.res +++ b/src/Payments/ApplePay.res @@ -259,7 +259,7 @@ let make = ( } } - React.useEffect1(() => { + React.useEffect2(() => { let handleApplePayMessages = (ev: Window.event) => { let json = try { ev.data->Js.Json.parseExn @@ -292,7 +292,7 @@ let make = ( Window.removeEventListener("message", handleApplePayMessages) }, ) - }, [isInvokeSDKFlow]) + }, (isInvokeSDKFlow, requiredFieldsBody)) React.useEffect1(() => { if (