Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhi Agrawal committed Nov 28, 2023
1 parent c3d17fe commit 30199de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions src/screens/HyperSwitch/SDKPayment/TestPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ let make = (
elementOptions
paymentElementOptions
returnUrl
isConfigureConnector={true}
amount
setClientSecret
/>
Expand All @@ -153,7 +152,6 @@ let make = (
elementOptions
paymentElementOptions
returnUrl
isConfigureConnector={true}
amount
setClientSecret
/>
Expand Down
11 changes: 1 addition & 10 deletions src/screens/HyperSwitch/SDKPayment/WebSDK.res
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module CheckoutForm = {
~layout="",
~methodsOrder=[],
~returnUrl,
~isConfigureConnector,
~saveViewToSdk=false,
~publishableKey,
~isSpaceAccordion=false,
Expand Down Expand Up @@ -215,12 +214,6 @@ module CheckoutForm = {
})
->ignore
}
let defaultHandleSubmit = () => {
setPaymentStatus(_ => LOADING)
Js.Global.setTimeout(() => {
setPaymentStatus(_ => SUCCESS)
}, 1000)->ignore
}
React.useEffect1(() => {
let id = Js.String2.split(clientSecret, "_secret_")[0]->Belt.Option.getWithDefault("")
switch Some(id) {
Expand Down Expand Up @@ -254,7 +247,7 @@ module CheckoutForm = {
customButtonStyle={`p-1 mt-2 w-full rounded-md ${primaryColor}`}
onClick={_ => {
setBtnState(_ => Button.Loading)
{isConfigureConnector ? handleSubmit() : defaultHandleSubmit()}
handleSubmit()
hyperswitchMixPanel(
~pageName=`${url.path->LogicUtils.getListHead}`,
~contextName="sdk",
Expand Down Expand Up @@ -298,7 +291,6 @@ let make = (
~fontFamily="",
~fontSizeBase="",
~paymentElementOptions,
~isConfigureConnector,
~returnUrl,
~layout="",
~methodsOrder=[],
Expand Down Expand Up @@ -328,7 +320,6 @@ let make = (
methodsOrder
layout
returnUrl
isConfigureConnector
saveViewToSdk
publishableKey
isSpaceAccordion
Expand Down

0 comments on commit 30199de

Please sign in to comment.