From 2a487beb38a21519a3a00589b559f594e5d2d967 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Mon, 30 Dec 2024 13:46:35 -0700 Subject: [PATCH] fix lint --- iam/src/utils/credentials.ts | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 305a4db397..2124c127f6 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -26,24 +26,30 @@ import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; -const providerTypePlatformMap = Object.entries(platforms).reduce((acc, [platformName, { providers }]) => { - providers.forEach(({ type }) => { - acc[type] = platformName; - }); +const providerTypePlatformMap = Object.entries(platforms).reduce( + (acc, [platformName, { providers }]) => { + providers.forEach(({ type }) => { + acc[type] = platformName; + }); - return acc; -}, {} as { [k: string]: string }); + return acc; + }, + {} as { [k: string]: string } +); function groupProviderTypesByPlatform(types: string[]): string[][] { return Object.values( - types.reduce((groupedProviders, type) => { - const platform = providerTypePlatformMap[type] || "generic"; + types.reduce( + (groupedProviders, type) => { + const platform = providerTypePlatformMap[type] || "generic"; - if (!groupedProviders[platform]) groupedProviders[platform] = []; - groupedProviders[platform].push(type); + if (!groupedProviders[platform]) groupedProviders[platform] = []; + groupedProviders[platform].push(type); - return groupedProviders; - }, {} as { [k: keyof typeof platforms]: string[] }) + return groupedProviders; + }, + {} as { [k: keyof typeof platforms]: string[] } + ) ); }