Skip to content

Commit

Permalink
Merge branch 'main' into detox-rn-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanskar2001 committed Dec 17, 2024
2 parents cb3b8d2 + edc0de8 commit 37f2213
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion reactNativeWeb/DemoApp/DemoAppIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let defaultProps = {
countryCode: 'US',
currencyCode: 'US',
},
displaySavedPaymentMethodsCheckbox: false,
// displaySavedPaymentMethodsCheckbox: false,
// shippingDetails: {
// address: {
// city: 'city',
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Pager.res
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ let make = (
}
}, (layout.width, panX))

let (height, setHeight) = React.useState(_ => 100.)
let (height, setHeight) = React.useState(_ => 0.)

let setDynamicHeight = React.useCallback1(height => {
setHeight(_ => height)
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/TopTabScreenWraper.res
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ open Style

@react.component
let make = (~children, ~setDynamicHeight, ~isScreenFocus) => {
let (viewHeight, setViewHeight) = React.useState(_ => 100.)
let (viewHeight, setViewHeight) = React.useState(_ => 0.)
let updateTabHeight = (event: Event.layoutEvent) => {
let {height} = event.nativeEvent.layout
if height > 100. && (viewHeight -. height)->Math.abs > 10. {
Expand Down
2 changes: 1 addition & 1 deletion src/components/elements/ModalHeader.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let make = (~onModalClose) => {
<View
style={viewStyle(
~display=#flex,
~flexGrow=?{WebKit.platform !== #web ? Some(1.) : None},
~flexGrow=?{ReactNative.Platform.os !== #web ? Some(1.) : None},
~flexDirection=#row,
~alignItems=#center,
~justifyContent=#"space-between",
Expand Down
3 changes: 3 additions & 0 deletions src/headless/Headless.res
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ let registerHeadless = headless => {
~paymentExperience=None,
~timestamp=0.,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)
headlessModule.exitHeadless(getDefaultError->HyperModule.stringifiedResStatus)
Expand Down Expand Up @@ -324,6 +325,7 @@ let registerHeadless = headless => {
~paymentExperience=None,
~timestamp=0.,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)
},
Expand Down Expand Up @@ -455,6 +457,7 @@ let registerHeadless = headless => {
~paymentExperience=None,
~timestamp,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)
savedPaymentMethodAPICall(nativeProp)
Expand Down
15 changes: 14 additions & 1 deletion src/headless/HeadlessUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ let logWrapper = (
~latency,
~env,
~customLogUrl,
~version,
(),
) => {
let (value, internalMetadata) = switch apiLogType {
Expand Down Expand Up @@ -66,7 +67,7 @@ let logWrapper = (
logType,
timestamp: timestamp->Float.toString,
sessionId: "",
version: "repoVersion",
version,
codePushVersion: LoggerUtils.getCodePushVersionNoFromRef(),
clientCoreVersion: LoggerUtils.getClientCoreVersionNoFromRef(),
component: MOBILE,
Expand Down Expand Up @@ -124,6 +125,7 @@ let savedPaymentMethodAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=initTimestamp,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)
CommonHooks.fetchApi(
Expand Down Expand Up @@ -155,6 +157,7 @@ let savedPaymentMethodAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Some(data)->Promise.resolve
Expand Down Expand Up @@ -188,6 +191,7 @@ let savedPaymentMethodAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Some(error)->Promise.resolve
Expand All @@ -212,6 +216,7 @@ let savedPaymentMethodAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
None->Promise.resolve
Expand Down Expand Up @@ -250,6 +255,7 @@ let sessionAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=initTimestamp,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)

Expand All @@ -274,6 +280,7 @@ let sessionAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
data->Fetch.Response.json
Expand Down Expand Up @@ -305,6 +312,7 @@ let sessionAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Promise.resolve(error)
Expand All @@ -329,6 +337,7 @@ let sessionAPICall = nativeProp => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Promise.resolve(JSON.Encode.null)
Expand Down Expand Up @@ -356,6 +365,7 @@ let confirmAPICall = (nativeProp, body) => {
~paymentExperience=None,
~timestamp=initTimestamp,
~latency=0.,
~version=nativeProp.hyperParams.sdkVersion,
(),
)

Expand All @@ -380,6 +390,7 @@ let confirmAPICall = (nativeProp, body) => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
data->Fetch.Response.json
Expand Down Expand Up @@ -412,6 +423,7 @@ let confirmAPICall = (nativeProp, body) => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Promise.resolve(error)
Expand Down Expand Up @@ -441,6 +453,7 @@ let confirmAPICall = (nativeProp, body) => {
~paymentExperience=None,
~timestamp=respTimestamp,
~latency={respTimestamp -. initTimestamp},
~version=nativeProp.hyperParams.sdkVersion,
(),
)
Promise.resolve(None)
Expand Down
7 changes: 1 addition & 6 deletions src/pages/payment/Card.res
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,7 @@ let make = (
if isScreenFocus {
setConfirmButtonDataRef(
<ConfirmButton
loading=false
isAllValuesValid=true
handlePress
paymentMethod="CARD"
errorText=error
bottomSpace=10.
loading=false isAllValuesValid=true handlePress paymentMethod="CARD" errorText=error
/>,
)
}
Expand Down
1 change: 0 additions & 1 deletion src/pages/payment/Redirect.res
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ let make = (
setConfirmButtonDataRef(
<ConfirmButton
loading=false
bottomSpace=50.
isAllValuesValid=true
handlePress
hasSomeFields
Expand Down

0 comments on commit 37f2213

Please sign in to comment.