Skip to content

Commit

Permalink
fix: comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Dec 5, 2024
1 parent 018e37b commit 4bbb062
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/CardTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ let getLocaleObject = async string => {
| NL => Js.import(DutchLocale.localeStrings)
| SV => Js.import(SwedishLocale.localeStrings)
| RU => Js.import(RussianLocale.localeStrings)
| ZH_HANT => Js.import(TraditionalChineseLocale.localeStrings)
}

let awaitedLocaleValue = await promiseLocale
Expand Down
10 changes: 5 additions & 5 deletions src/Payments/PazeWallet.res
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ let make = (~logger: HyperLogger.loggerMake) => {
resolve()
}
}
logger.setLogInfo(~value="Paze SDK Script Loading", ~eventName=PAZE_SDK_FLOW)
logger.setLogInfo(~value="PAZE SDK Script Loading", ~eventName=PAZE_SDK_FLOW)
let pazeScript = Window.createElement("script")
pazeScript->Window.elementSrc(pazeScriptURL)
pazeScript->Window.elementOnerror(exn => {
let err = exn->Identity.anyTypeToJson->JSON.stringify
logger.setLogError(
~value=`Error During Loading Paze SDK Script: ${err}`,
~value=`Error During Loading PAZE SDK Script: ${exn
->Identity.anyTypeToJson
->JSON.stringify}`,
~eventName=PAZE_SDK_FLOW,
)
Console.log2("PAZE --- errrorrr", err)
})
pazeScript->Window.elementOnload(_ => {
logger.setLogInfo(~value="Pzae SDK Script Loaded", ~eventName=PAZE_SDK_FLOW)
logger.setLogInfo(~value="PAZE SDK Script Loaded", ~eventName=PAZE_SDK_FLOW)
loadPazeSDK()->ignore
})
Window.body->Window.appendChild(pazeScript)
Expand Down
2 changes: 1 addition & 1 deletion src/Payments/SamsungPayComponent.res
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let make = (~sessionObj: option<JSON.t>, ~walletOptions) => {
let onSamsungPaymentButtonClick = _ => {
loggerState.setLogInfo(
~value="SamsungPay Button Clicked",
~eventName=SAMSUNG_PAY_FLOW,
~eventName=SAMSUNG_PAY,
~paymentMethod="SAMSUNG_PAY",
)
SamsungPayHelpers.handleSamsungPayClicked(
Expand Down
18 changes: 10 additions & 8 deletions src/hyper-loader/Elements.res
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,8 @@ let make = (
})
->catch(err => {
logger.setLogError(
~value=err->formatException->JSON.stringify,
~eventName=SAMSUNG_PAY_FLOW,
~value=`SAMSUNG PAY not ready ${err->formatException->JSON.stringify}`,
~eventName=SAMSUNG_PAY,
~paymentMethod="SAMSUNG_PAY",
~logType=ERROR,
)
Expand Down Expand Up @@ -1209,8 +1209,10 @@ let make = (
})
->catch(err => {
logger.setLogError(
~value=err->formatException->JSON.stringify,
~eventName=SAMSUNG_PAY_FLOW,
~value=`SAMSUNG PAY Initialization fail ${err
->formatException
->JSON.stringify}`,
~eventName=SAMSUNG_PAY,
~paymentMethod="SAMSUNG_PAY",
~logType=ERROR,
)
Expand All @@ -1230,17 +1232,17 @@ let make = (
} catch {
| err =>
logger.setLogError(
~value=err->formatException->JSON.stringify,
~eventName=SAMSUNG_PAY_FLOW,
~value=`SAMSUNG PAY Not Ready - ${err->formatException->JSON.stringify}`,
~eventName=SAMSUNG_PAY,
~paymentMethod="SAMSUNG_PAY",
~logType=ERROR,
)
Console.log("Error loading Samsung Pay")
}
} else if wallets.samsungPay === Never {
logger.setLogInfo(
~value="SamsungPay is set as never by merchant",
~eventName=SAMSUNG_PAY_FLOW,
~value="SAMSUNG PAY is set as never by merchant",
~eventName=SAMSUNG_PAY,
~paymentMethod="SAMSUNG_PAY",
~logType=INFO,
)
Expand Down
2 changes: 1 addition & 1 deletion src/hyper-log-catcher/HyperLogger.res
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type eventName =
| POST_SESSION_TOKENS_CALL_INIT
| PAZE_SDK_FLOW
| SAMSUNG_PAY_SCRIPT
| SAMSUNG_PAY_FLOW
| SAMSUNG_PAY

let eventNameToStrMapper = (eventName: eventName) => (eventName :> string)

Expand Down

0 comments on commit 4bbb062

Please sign in to comment.