diff --git a/iam/.env-example.env b/iam/.env-example.env index 2cf577ec1e..f56f699303 100644 --- a/iam/.env-example.env +++ b/iam/.env-example.env @@ -57,7 +57,7 @@ PASSPORT_SCORER_BACKEND=http://localhost:8002/ # Needs to match FE/APP equivalents in app/.env ALLO_SCORER_ID=3 SCORER_ENDPOINT=http://localhost:8002/ -SCORER_API_KEY=abc +SCORER_API_KEY=abc # This is a static authentication secret token EAS_FEE_USD=2 EAS_GITCOIN_STAMP_SCHEMA=0xd83994d5459162a259c3a18d3db267ca05982f1e1e261d5388a8bfe2a2a2c7f9 @@ -68,7 +68,6 @@ PASSPORT_STAMP_METADATA_PATH=http://localhost:3000/stampMetadata.json INCLUDE_TESTNETS=false ZKSYNC_ERA_MAINNET_ENDPOINT=zksync_mainnet_endpoint -CGRANTS_API_TOKEN=abc CGRANTS_API_URL=http://localhost:8002/cgrants diff --git a/platforms/src/AllowList/Providers/allowList.ts b/platforms/src/AllowList/Providers/allowList.ts index 6a648d6323..13e60636a1 100644 --- a/platforms/src/AllowList/Providers/allowList.ts +++ b/platforms/src/AllowList/Providers/allowList.ts @@ -19,7 +19,7 @@ export class AllowListProvider implements Provider { const { address } = payload; const { allowList } = payload.proofs; const response: AllowListResponse = await axios.get(`${allowListEndpoint}/${allowList}/${address}`, { - headers: { Authorization: process.env.CGRANTS_API_TOKEN }, + headers: { Authorization: process.env.SCORER_API_KEY }, }); const valid = response.data.is_member; diff --git a/platforms/src/CustomGithub/Providers/github.ts b/platforms/src/CustomGithub/Providers/github.ts index 5d1183fcb0..5c3e9925b9 100644 --- a/platforms/src/CustomGithub/Providers/github.ts +++ b/platforms/src/CustomGithub/Providers/github.ts @@ -29,7 +29,7 @@ const getCondition = async (type: string, conditionName: string, conditionHash: try { const url = `${githubConditionEndpoint}/${type}%23${conditionName}%23${conditionHash}`; const response: ConditionResponse = await axios.get(url, { - headers: { Authorization: process.env.CGRANTS_API_TOKEN }, + headers: { Authorization: process.env.SCORER_API_KEY }, }); return response.data.ruleset.condition; } catch (error) { diff --git a/platforms/src/Gitcoin/Providers/__tests__/gitcoinGrantsStatistics.test.ts b/platforms/src/Gitcoin/Providers/__tests__/gitcoinGrantsStatistics.test.ts index 1c4de2672c..2435abd8ca 100644 --- a/platforms/src/Gitcoin/Providers/__tests__/gitcoinGrantsStatistics.test.ts +++ b/platforms/src/Gitcoin/Providers/__tests__/gitcoinGrantsStatistics.test.ts @@ -12,7 +12,7 @@ jest.mock("axios"); const mockedAxios = axios as jest.Mocked; const userHandle = "my-login-handle"; -const cgrantsApiToken = process.env.CGRANTS_API_TOKEN; +const cgrantsApiToken = process.env.SCORER_API_KEY; const address = "0x0"; diff --git a/platforms/src/Gitcoin/Providers/gitcoinGrantsStatistics.ts b/platforms/src/Gitcoin/Providers/gitcoinGrantsStatistics.ts index 10755b72f3..cc31495ab9 100644 --- a/platforms/src/Gitcoin/Providers/gitcoinGrantsStatistics.ts +++ b/platforms/src/Gitcoin/Providers/gitcoinGrantsStatistics.ts @@ -96,7 +96,7 @@ const getGitcoinStatistics = async ( if (!context.gitcoinGrantStatistics) context.gitcoinGrantStatistics = {}; const grantStatisticsRequest = await axios.get(`${dataUrl}?address=${address}`, { - headers: { Authorization: process.env.CGRANTS_API_TOKEN }, + headers: { Authorization: process.env.SCORER_API_KEY }, }); context.gitcoinGrantStatistics[dataUrl] = { record: grantStatisticsRequest.data } as GitcoinGrantStatistics; diff --git a/platforms/src/GtcStaking/Providers/GtcStaking.ts b/platforms/src/GtcStaking/Providers/GtcStaking.ts index c4c14327d6..213cb4468b 100644 --- a/platforms/src/GtcStaking/Providers/GtcStaking.ts +++ b/platforms/src/GtcStaking/Providers/GtcStaking.ts @@ -118,7 +118,7 @@ export class GtcStakingProvider implements Provider { const communityStakesV2: StakeV2[] = []; const responseV2: StakeV2Response = await axios.get(`${gtcStakingEndpointV2}/${address}`, { - headers: { Authorization: process.env.CGRANTS_API_TOKEN }, + headers: { Authorization: process.env.SCORER_API_KEY }, }); const resultsV2: StakeV2[] = responseV2?.data?.items || []; diff --git a/platforms/src/TrustaLabs/Providers/TrustaLabs.ts b/platforms/src/TrustaLabs/Providers/TrustaLabs.ts index c8335e8384..d2ef78d0d4 100644 --- a/platforms/src/TrustaLabs/Providers/TrustaLabs.ts +++ b/platforms/src/TrustaLabs/Providers/TrustaLabs.ts @@ -36,7 +36,7 @@ interface AxiosResponse { const TRUSTA_LABS_API_ENDPOINT = "https://www.trustalabs.ai/service/openapi/queryRiskSummaryScore"; const createUpdateDBScoreData = async (address: string, scoreData: TrustaLabsData) => { - const accessToken = process.env.CGRANTS_API_TOKEN; + const accessToken = process.env.SCORER_API_KEY; try { await axios.post( `${process.env.PASSPORT_SCORER_BACKEND}trusta_labs/trusta-labs-score`,