Skip to content

Commit

Permalink
Add score api endpoint as pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Aug 10, 2023
1 parent a0e15f7 commit c928f18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,13 @@ export async function getScores(
network: string,
addresses: string[],
snapshot: number | string = 'latest',
scoreApiUrl = 'https://score.snapshot.org/api/scores',
scoreApiUrl = 'https://score.snapshot.org',
options: any = { returnValue: 'scores' }
) {
const url = new URL(scoreApiUrl);
url.pathname = '/api/scores';
scoreApiUrl = url.toString();

try {
const params = {
space,
Expand Down

0 comments on commit c928f18

Please sign in to comment.