From b86881b0dc8daf3981c608970c663f1eb4cd963a Mon Sep 17 00:00:00 2001 From: 1emu Date: Tue, 11 Jun 2024 17:21:43 -0300 Subject: [PATCH] fix: remove picked by space param --- src/back/routes/snapshot.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/back/routes/snapshot.ts b/src/back/routes/snapshot.ts index 5413c92b0..090ab52de 100644 --- a/src/back/routes/snapshot.ts +++ b/src/back/routes/snapshot.ts @@ -4,6 +4,7 @@ import routes from 'decentraland-gatsby/dist/entities/Route/routes' import { Request } from 'express' import { SnapshotSubgraph } from '../../clients/SnapshotSubgraph' +import { SNAPSHOT_SPACE } from '../../entities/Snapshot/constants' import { getDelegations as getSnapshotDelegations } from '../../entities/Snapshot/utils' import { SnapshotService } from '../../services/SnapshotService' import { SnapshotStatusService } from '../../services/SnapshotStatusService' @@ -92,11 +93,7 @@ async function getDelegations(req: Request) { } async function getPickedBy(req: Request) { - const { addresses, space } = req.body + const { addresses } = req.body validateAddresses(addresses) - if (!space || typeof space !== 'string' || space.length === 0) { - throw new RequestError('Invalid snapshot space', RequestError.BadRequest) - } - - return await SnapshotSubgraph.get().getPickedBy(addresses, space) + return await SnapshotSubgraph.get().getPickedBy(addresses, SNAPSHOT_SPACE) }