Skip to content

Commit 2481391

Browse files
authored
chore: remove deprecated delegation parameter (#1179)
* chore: remove deprecated delegation parameter * fixes * fix test
1 parent b916e21 commit 2481391

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@snapshot-labs/snapshot.js",
3-
"version": "0.14.8",
3+
"version": "0.14.9",
44
"repository": "snapshot-labs/snapshot.js",
55
"license": "MIT",
66
"main": "dist/snapshot.cjs.js",

src/utils.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ describe('utils', () => {
372372
],
373373
snapshot: 7929876,
374374
space: 'test.eth',
375-
delegation: false,
376375
options: undefined
377376
};
378377

@@ -383,7 +382,7 @@ describe('utils', () => {
383382
strategies ?? payload.strategies,
384383
snapshot ?? payload.snapshot,
385384
'test.eth' ?? payload.space,
386-
false ?? payload.delegation,
385+
false,
387386
options ?? payload.options
388387
);
389388
}

src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export async function getVp(
484484
strategies: Strategy[],
485485
snapshot: number | 'latest',
486486
space: string,
487-
delegation: boolean,
487+
delegation: false, // @deprecated - kept for backward compatibility for integrators using this function, no longer sent to API
488488
options?: Options
489489
) {
490490
const { url, headers } = formatScoreAPIUrl(options?.url);
@@ -520,8 +520,7 @@ export async function getVp(
520520
network,
521521
strategies,
522522
snapshot,
523-
space,
524-
delegation
523+
space
525524
}
526525
})
527526
};

0 commit comments

Comments
 (0)