Skip to content

Commit

Permalink
Change case of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Aug 9, 2023
1 parent 5963367 commit 5c53c9e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ interface Strategy {
}

export const SNAPSHOT_SUBGRAPH_URL = delegationSubgraphs;
const ENS_RESOLVER_ABI = [
'function text(bytes32 node, string calldata key) external view returns (string memory)'
];
const SCORE_API_KEY = process?.env?.KEYCARD_SECRET || '';
const SCORE_API_HEADERS = {

const scoreApiHeaders = {
Accept: 'application/json',
'Content-Type': 'application/json'
};
if (SCORE_API_KEY) SCORE_API_HEADERS['X-API-KEY'] = SCORE_API_KEY;

const ENS_RESOLVER_ABI = [
'function text(bytes32 node, string calldata key) external view returns (string memory)'
];
if (SCORE_API_KEY) scoreApiHeaders['X-API-KEY'] = SCORE_API_KEY;

const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, $data: true });
// @ts-ignore
Expand Down Expand Up @@ -234,7 +234,7 @@ export async function getScores(
};
const res = await fetch(scoreApiUrl, {
method: 'POST',
headers: SCORE_API_HEADERS,
headers: scoreApiHeaders,
body: JSON.stringify({ params })
});
const obj = await res.json();
Expand All @@ -257,7 +257,7 @@ export async function getVp(
if (!options.url) options.url = 'https://score.snapshot.org';
const init = {
method: 'POST',
headers: SCORE_API_HEADERS,
headers: scoreApiHeaders,
body: JSON.stringify({
jsonrpc: '2.0',
method: 'get_vp',
Expand Down Expand Up @@ -290,7 +290,7 @@ export async function validate(
if (!options.url) options.url = 'https://score.snapshot.org';
const init = {
method: 'POST',
headers: SCORE_API_HEADERS,
headers: scoreApiHeaders,
body: JSON.stringify({
jsonrpc: '2.0',
method: 'validate',
Expand Down

0 comments on commit 5c53c9e

Please sign in to comment.