From bc4ac7367d1be7a25dece79f020a4eb647dd7be8 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Wed, 20 Mar 2024 17:13:00 +0530 Subject: [PATCH] chore: unnecessary types removal --- src/CardTheme.res | 8 ++++---- src/Components/AddressPaymentInput.res | 4 +--- src/Components/PaymentDropDownField.res | 4 +--- src/Utilities/PaymentHelpers.res | 2 +- src/Utilities/Utils.res | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/CardTheme.res b/src/CardTheme.res index 005251657..25245d06f 100644 --- a/src/CardTheme.res +++ b/src/CardTheme.res @@ -293,8 +293,8 @@ let getVariables = (str, dict, default, logger) => { let getAppearance = ( str, dict, - default: OrcaPaymentPage.CardThemeType.themeClass, - defaultRules: OrcaPaymentPage.CardThemeType.themeClass => JSON.t, + default: CardThemeType.themeClass, + defaultRules: CardThemeType.themeClass => JSON.t, logger, ) => { dict @@ -341,8 +341,8 @@ let getFonts = (str, dict, logger) => { } let itemToObjMapper = ( dict, - default: OrcaPaymentPage.CardThemeType.themeClass, - defaultRules: OrcaPaymentPage.CardThemeType.themeClass => JSON.t, + default: CardThemeType.themeClass, + defaultRules: CardThemeType.themeClass => JSON.t, logger, ) => { unknownKeysWarning( diff --git a/src/Components/AddressPaymentInput.res b/src/Components/AddressPaymentInput.res index b19205a51..ce912f2d6 100644 --- a/src/Components/AddressPaymentInput.res +++ b/src/Components/AddressPaymentInput.res @@ -67,9 +67,7 @@ let make = (~paymentType, ~className="") => { let checkPostalValidity = ( postal: RecoilAtomTypes.field, - setPostal: ( - OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field - ) => unit, + setPostal: (RecoilAtomTypes.field => RecoilAtomTypes.field) => unit, regex, ) => { if RegExp.test(regex->RegExp.fromString, postal.value) && postal.value !== "" && regex !== "" { diff --git a/src/Components/PaymentDropDownField.res b/src/Components/PaymentDropDownField.res index d42a42c3b..e0d1e247b 100644 --- a/src/Components/PaymentDropDownField.res +++ b/src/Components/PaymentDropDownField.res @@ -2,9 +2,7 @@ open RecoilAtoms @react.component let make = ( ~value: RecoilAtomTypes.field, - ~setValue: ( - OrcaPaymentPage.RecoilAtomTypes.field => OrcaPaymentPage.RecoilAtomTypes.field - ) => unit, + ~setValue: (RecoilAtomTypes.field => RecoilAtomTypes.field) => unit, ~fieldName, ~options, ~disabled=false, diff --git a/src/Utilities/PaymentHelpers.res b/src/Utilities/PaymentHelpers.res index aafdd3374..4f0511f82 100644 --- a/src/Utilities/PaymentHelpers.res +++ b/src/Utilities/PaymentHelpers.res @@ -100,7 +100,7 @@ let rec intentCall = ( ~headers: Dict.t=?, ~method: Fetch.method, unit, - ) => OrcaPaymentPage.Promise.t, + ) => Promise.t, ~uri, ~headers, ~bodyStr, diff --git a/src/Utilities/Utils.res b/src/Utilities/Utils.res index 93789f8d9..d2c9df7b1 100644 --- a/src/Utilities/Utils.res +++ b/src/Utilities/Utils.res @@ -659,7 +659,7 @@ let handlePostMessageEvents = ( ~complete, ~empty, ~paymentType, - ~loggerState: OrcaPaymentPage.OrcaLogger.loggerMake, + ~loggerState: OrcaLogger.loggerMake, ) => { if complete && paymentType !== "" { loggerState.setLogInfo(