diff --git a/src/hooks/ListHooks.res b/src/hooks/ListHooks.res index abd0da52c..ba592d442 100644 --- a/src/hooks/ListHooks.res +++ b/src/hooks/ListHooks.res @@ -14,12 +14,12 @@ let useListCount = (~entityName) => { | CONNECTOR => response ->getObjectArrayFromJson - ->HSwitchUtils.filterList(~removeFromList=FRMPlayer, ()) + ->HSwitchUtils.filterList(~removeFromList=FRMPlayer) ->Js.Array2.length | FRAUD_RISK_MANAGEMENT => response ->getObjectArrayFromJson - ->HSwitchUtils.filterList(~removeFromList=Connector, ()) + ->HSwitchUtils.filterList(~removeFromList=Connector) ->Js.Array2.length | _ => response->getArrayFromJson([])->Js.Array2.length } diff --git a/src/screens/HyperSwitch/HSwitchUtils.res b/src/screens/HyperSwitch/HSwitchUtils.res index 3e704b363..0f1fc990b 100644 --- a/src/screens/HyperSwitch/HSwitchUtils.res +++ b/src/screens/HyperSwitch/HSwitchUtils.res @@ -154,7 +154,7 @@ module BackgroundImageWrapper = { type processors = FRMPlayer | Connector | PayoutConnector -let filterList = (items, ~removeFromList=FRMPlayer, ()) => { +let filterList = (items, ~removeFromList) => { items->Js.Array2.filter(dict => { let connectorType = dict->getString("connector_type", "") let isPayoutConnector = connectorType == "payout_processor" @@ -169,7 +169,7 @@ let filterList = (items, ~removeFromList=FRMPlayer, ()) => { } let getProcessorsListFromJson = (json, ~removeFromList=FRMPlayer, ()) => { - json->getArrayFromJson([])->Js.Array2.map(getDictFromJsonObject)->filterList(~removeFromList, ()) + json->getArrayFromJson([])->Js.Array2.map(getDictFromJsonObject)->filterList(~removeFromList) } let getPageNameFromUrl = url => { diff --git a/src/screens/HyperSwitch/SDKPayment/SDKPaymentTypes.res b/src/screens/HyperSwitch/SDKPayment/SDKPaymentTypes.res index 42146dfe9..0e543a9fa 100644 --- a/src/screens/HyperSwitch/SDKPayment/SDKPaymentTypes.res +++ b/src/screens/HyperSwitch/SDKPayment/SDKPaymentTypes.res @@ -2,6 +2,5 @@ type paymentType = { amount: int, currency: string, profile_id: string, - customer_id: string, description: string, } diff --git a/src/screens/HyperSwitch/SDKPayment/SDKPaymentUtils.res b/src/screens/HyperSwitch/SDKPayment/SDKPaymentUtils.res index 1680b7392..e811356e2 100644 --- a/src/screens/HyperSwitch/SDKPayment/SDKPaymentUtils.res +++ b/src/screens/HyperSwitch/SDKPayment/SDKPaymentUtils.res @@ -4,7 +4,6 @@ let initialValueForForm: HSwitchSettingTypes.profileEntity => SDKPaymentTypes.pa currency: "United States-USD", profile_id: defaultBusinessProfile.profile_id, description: "Default value", - customer_id: "hyperswitch_sdk_demo_id", } } @@ -15,7 +14,6 @@ let getTypedValueForPayment: Js.Json.t => SDKPaymentTypes.paymentType = values = amount: dictOfValues->getInt("amount", 100), currency: dictOfValues->getString("currency", "United States-USD"), profile_id: dictOfValues->getString("profile_id", ""), - customer_id: dictOfValues->getString("customer_id", ""), description: dictOfValues->getString("description", "Default value"), } } diff --git a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthTypes.res b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthTypes.res index 16d723ecc..0dffb0772 100644 --- a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthTypes.res +++ b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthTypes.res @@ -1,6 +1,4 @@ type authInfo = { - email: string, - name: string, token: string, merchantId: string, username: string, @@ -11,17 +9,11 @@ open LogicUtils let getAuthInfo = (json, str) => { let dict = json->JsonFlattenUtils.flattenObject(false) - let emailKey = "email" - let tokenKey = "token" - - let name = "name" let merchantIdKey = "merchantId" let userNameKey = "username" let authInfo = { - name: getString(dict, name, ""), - email: getString(dict, emailKey, ""), token: getString(dict, tokenKey, str), merchantId: getString(dict, merchantIdKey, str), username: getString(dict, userNameKey, ""), @@ -32,8 +24,6 @@ let getAuthInfo = (json, str) => { let getDummyAuthInfoForToken = token => { let authInfo = { - name: "", - email: "", token, merchantId: "", username: "", diff --git a/src/utils/DateTimeUtils.res b/src/utils/DateTimeUtils.res index d1767212f..13c0181e8 100644 --- a/src/utils/DateTimeUtils.res +++ b/src/utils/DateTimeUtils.res @@ -36,14 +36,6 @@ let getStartOfWeek = (dayJs: Js.Date.t, startOfday: days) => { ->DayJs.getDayJsForJsDate } -let utcTimeToIST = timeStr => { - if !(timeStr->Js.String.endsWith("Z") || timeStr->Js.String.endsWith("z")) { - `${timeStr}Z` - } else { - timeStr - } -} - let utcToIST = timeStr => { let isEU = false let updatedHour = Js.Date.getHours(timeStr) +. 5.0 @@ -70,21 +62,6 @@ let utcToISTDate = timeStr => { } } -let lastDate = (date: float) => { - Js.Date.setDate( - Js.Date.setMonthD( - date->Js.Date.fromFloat, - ~month=Js.Date.getMonth(date->Js.Date.fromFloat) +. 1., - ~date=1., - (), - )->Js.Date.fromFloat, - 0., - ) -} -let firstDate = (date: float) => { - Js.Date.setDate(date->Js.Date.fromFloat, 1.) -} - let parseAsFloat = (dateStr: string) => { let date = (dateStr->DayJs.getDayJsForString).toDate(.) Js.Date.makeWithYMDHMS( diff --git a/src/utils/DownloadUtils.res b/src/utils/DownloadUtils.res index 82a212f2c..ccadc0d6f 100644 --- a/src/utils/DownloadUtils.res +++ b/src/utils/DownloadUtils.res @@ -15,22 +15,7 @@ let download = (~fileName, ~content, ~fileType) => { a->clickElement } type imageType = [#svg | #png | #jpeg | #jpg] -let imageTypeToStr = imageType => { - switch imageType { - | #svg => "svg" - | #png => "png" - | #jpeg => "jpeg" - | #jpg => "jpg" - } -} let downloadOld = (~fileName, ~content) => { download(~fileName, ~content, ~fileType="text/plain") } - -let openInNewTab = (~href) => { - let a = Webapi.Dom.document->Webapi.Dom.Document.createElement("a") - a->Webapi.Dom.Element.setAttribute("href", href) - a->Webapi.Dom.Element.setAttribute("target", "_blank") - a->clickElement -} diff --git a/src/utils/HSwitchGlobalVars.res b/src/utils/HSwitchGlobalVars.res index 48b59cd28..2ad551df6 100644 --- a/src/utils/HSwitchGlobalVars.res +++ b/src/utils/HSwitchGlobalVars.res @@ -59,5 +59,4 @@ let urlToDownloadApplePayCertificate = switch hostType { | _ => "/apple-developer-merchantid-domain-association" } -let recoEmail = "biz@hyperswitch.io" let agreementVersion = "1.1.0"