From 6f4adbcc3f645c9edb576d548e182a649e2fdf86 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Thu, 23 May 2024 16:19:27 +0530 Subject: [PATCH] fix: remove unused function --- src/Components/PayNowButton.res | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/Components/PayNowButton.res b/src/Components/PayNowButton.res index e9a364174..7d4653914 100644 --- a/src/Components/PayNowButton.res +++ b/src/Components/PayNowButton.res @@ -21,23 +21,9 @@ let make = () => { let confirmPayload = sdkHandleConfirmPayment->PaymentBody.confirmPayloadForSDKButton let buttonText = sdkHandleConfirmPayment.buttonText->Option.getOr(localeString.payNowButton) - let handleMessage = (event: Types.event) => { - let json = event.data->Identity.anyTypeToJson->getStringFromJson("")->safeParse - let dict = json->getDictFromJson - switch dict->Dict.get("submitSuccessful") { - | Some(_) => - if sdkHandleConfirmPayment.confirmParams.redirect === Some("if_required") { - setIsPayNowButtonDisable(_ => false) - setShowLoader(_ => false) - } - | None => () - } - } - let handleOnClick = _ => { setIsPayNowButtonDisable(_ => true) setShowLoader(_ => true) - EventListenerManager.addSmartEventListener("message", handleMessage, "onSubmitSuccessful") handlePostMessage([("handleSdkConfirm", confirmPayload)]) }