Skip to content

Commit

Permalink
Revert "fix: modified api endpoint, memoized api data, webpack fixes"
Browse files Browse the repository at this point in the history
This reverts commit 5f2e796.
  • Loading branch information
Vrishab Srivatsa committed Apr 15, 2024
1 parent 1e9545c commit 1307da8
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 179 deletions.
14 changes: 10 additions & 4 deletions src/Payments/PreMountLoader.res
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,35 @@ let make = (~sessionId, ~publishableKey, ~clientSecret) => {

let endpoint = ApiEndpoint.getApiEndPoint(~publishableKey, ())

let (paymentMethodsResponse, customerPaymentMethodsResponse, sessionTokensResponse) = (
let paymentMethodsResponse = React.useMemo0(() =>
PaymentHelpers.fetchPaymentMethodList(
~clientSecret,
~publishableKey,
~logger,
~switchToCustomPod=false,
~endpoint,
),
)
)

let customerPaymentMethodsResponse = React.useMemo0(() =>
PaymentHelpers.fetchCustomerPaymentMethodList(
~clientSecret,
~publishableKey,
~optLogger=Some(logger),
~switchToCustomPod=false,
~endpoint,
),
)
)

let sessionTokensResponse = React.useMemo0(() =>
PaymentHelpers.fetchSessions(
~clientSecret,
~publishableKey,
~optLogger=Some(logger),
~switchToCustomPod=false,
~endpoint,
(),
),
)
)

let sendPromiseData = (promise, key) => {
Expand Down
Loading

0 comments on commit 1307da8

Please sign in to comment.