diff --git a/webserver/server/app/controllers/DelegationForPoolController.ts b/webserver/server/app/controllers/DelegationForPoolController.ts index 3419dbcf..e28d0bb8 100644 --- a/webserver/server/app/controllers/DelegationForPoolController.ts +++ b/webserver/server/app/controllers/DelegationForPoolController.ts @@ -35,18 +35,6 @@ export class DelegationForPoolController extends Controller { ); } - const slotRangeSize = requestBody.range.maxSlot - requestBody.range.minSlot; - if (slotRangeSize > POOL_DELEGATION_LIMIT.SLOT_RANGE) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return errorResponse( - StatusCodes.BAD_REQUEST, - genErrorMessage(Errors.SlotRangeLimitExceeded, { - limit: POOL_DELEGATION_LIMIT.SLOT_RANGE, - found: slotRangeSize, - }) - ); - } - const response = await tx(pool, async dbTx => { const data = await delegationsForPool({ pools: requestBody.pools.map(poolId => Buffer.from(poolId, 'hex')), diff --git a/webserver/server/app/controllers/ProjectedNftRangeController.ts b/webserver/server/app/controllers/ProjectedNftRangeController.ts index c88e50d5..046dff65 100644 --- a/webserver/server/app/controllers/ProjectedNftRangeController.ts +++ b/webserver/server/app/controllers/ProjectedNftRangeController.ts @@ -7,8 +7,6 @@ import type { EndpointTypes } from '../../../shared/routes'; import { Routes } from '../../../shared/routes'; import { projectedNftRange, projectedNftRangeByAddress } from '../services/ProjectedNftRange'; import type {ProjectedNftRangeResponse} from '../../../shared/models/ProjectedNftRange'; -import {PROJECTED_NFT_LIMIT} from "../../../shared/constants"; -import {Errors, genErrorMessage} from "../../../shared/errors"; const route = Routes.projectedNftEventsRange; @@ -28,30 +26,8 @@ export class ProjectedNftRangeController extends Controller { const slotRangeSize = requestBody.range.maxSlot - requestBody.range.minSlot; if (requestBody.address !== undefined) { - if (slotRangeSize > PROJECTED_NFT_LIMIT.SINGLE_USER_SLOT_RANGE) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return errorResponse( - StatusCodes.BAD_REQUEST, - genErrorMessage(Errors.SlotRangeLimitExceeded, { - limit: PROJECTED_NFT_LIMIT.SINGLE_USER_SLOT_RANGE, - found: slotRangeSize, - }) - ); - } - return await this.handle_by_address_query(requestBody.address, requestBody); } else { - if (slotRangeSize > PROJECTED_NFT_LIMIT.SLOT_RANGE) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return errorResponse( - StatusCodes.BAD_REQUEST, - genErrorMessage(Errors.SlotRangeLimitExceeded, { - limit: PROJECTED_NFT_LIMIT.SLOT_RANGE, - found: slotRangeSize, - }) - ); - } - return await this.handle_general_query(requestBody); } } diff --git a/webserver/shared/constants.ts b/webserver/shared/constants.ts index 1f3ce4df..cf30584d 100644 --- a/webserver/shared/constants.ts +++ b/webserver/shared/constants.ts @@ -29,10 +29,4 @@ export const DEX_PRICE_LIMIT = { export const POOL_DELEGATION_LIMIT = { POOLS: 50, - SLOT_RANGE: 20000, -}; - -export const PROJECTED_NFT_LIMIT = { - SLOT_RANGE: 100000, - SINGLE_USER_SLOT_RANGE: 10000000000, };