Skip to content

Commit

Permalink
fix: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed May 23, 2024
1 parent 0eb6dec commit 6f4adbc
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/Components/PayNowButton.res
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
}

Expand Down

0 comments on commit 6f4adbc

Please sign in to comment.