diff --git a/src/back/routes/snapshot.ts b/src/back/routes/snapshot.ts index e7c82dd80..25b2d1297 100644 --- a/src/back/routes/snapshot.ts +++ b/src/back/routes/snapshot.ts @@ -5,7 +5,7 @@ import { Request } from 'express' import { SnapshotVote } from '../../clients/SnapshotGraphqlTypes' import { SnapshotService } from '../../services/SnapshotService' -import { validateAddress, validateDates, validateFields, validateProposalId } from '../utils/validations' +import { validateAddress, validateDates, validateFields } from '../utils/validations' export default routes((router) => { router.get('/snapshot/status-space/:spaceName', handleAPI(getStatusAndSpace)) @@ -62,7 +62,6 @@ async function getPendingProposals(req: Request) { async function getVpDistribution(req: Request<{ address: string; proposalSnapshotId?: string }>) { const { address, proposalSnapshotId } = req.params validateAddress(address) - validateProposalId(proposalSnapshotId, 'optional') return await SnapshotService.getVpDistribution(address, proposalSnapshotId) } diff --git a/src/services/SnapshotService.ts b/src/services/SnapshotService.ts index bbd639f6d..9a070c468 100644 --- a/src/services/SnapshotService.ts +++ b/src/services/SnapshotService.ts @@ -120,7 +120,7 @@ export class SnapshotService { return await SnapshotGraphql.get().getPendingProposals(start, end, fields, limit) } - static async getVpDistribution(address: string, proposalId?: string): Promise { - return await SnapshotGraphql.get().getVpDistribution(address, proposalId) + static async getVpDistribution(address: string, proposalSnapshotId?: string): Promise { + return await SnapshotGraphql.get().getVpDistribution(address, proposalSnapshotId) } }