Skip to content

Commit

Permalink
refactor: changed variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
sakksham7 committed Oct 15, 2024
1 parent 27d3a08 commit d345ab7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/orca-loader/LoaderPaymentElement.res
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let make = (
}
}

let meraEvHandler = ref(Some(() => Promise.make((_, _) => {()})))
let currEventHandler = ref(Some(() => Promise.make((_, _) => {()})))
let walletOneClickEventHandler = (event: Types.event) => {
let json = try {
event.data->anyTypeToJson
Expand All @@ -52,7 +52,7 @@ let make = (

let dict = json->getDictFromJson
if dict->Dict.get("oneClickConfirmTriggered")->Option.isSome {
switch meraEvHandler.contents {
switch currEventHandler.contents {
| Some(eH) =>
asyncWrapper(eH)
->Promise.then(() => {
Expand All @@ -70,7 +70,7 @@ let make = (
Window.addEventListener("message", walletOneClickEventHandler)

let onSDKHandleClick = (eventHandler: option<unit => RescriptCore.Promise.t<'a>>) => {
meraEvHandler := eventHandler
currEventHandler := eventHandler
onSDKHandleClickIsUsed := true
}

Expand Down

0 comments on commit d345ab7

Please sign in to comment.