File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @snapshot-labs/snapshot.js" ,
3
- "version" : " 0.5.1 " ,
3
+ "version" : " 0.5.2 " ,
4
4
"repository" : " snapshot-labs/snapshot.js" ,
5
5
"license" : " MIT" ,
6
6
"main" : " dist/snapshot.cjs.js" ,
Original file line number Diff line number Diff line change @@ -219,9 +219,14 @@ export async function getScores(
219
219
network : string ,
220
220
addresses : string [ ] ,
221
221
snapshot : number | string = 'latest' ,
222
- scoreApiUrl = 'https://score.snapshot.org/api/scores ' ,
223
- options : any = { returnValue : 'scores' }
222
+ scoreApiUrl = 'https://score.snapshot.org' ,
223
+ options : any = { }
224
224
) {
225
+ if ( ! options . returnValue ) options . returnValue = 'scores' ;
226
+ const url = new URL ( scoreApiUrl ) ;
227
+ url . pathname = '/api/scores' ;
228
+ scoreApiUrl = url . toString ( ) ;
229
+
225
230
try {
226
231
const params = {
227
232
space,
You can’t perform that action at this time.
0 commit comments