@@ -198,7 +198,7 @@ export function createTxRouter(db: PgStore): express.Router {
198
198
'/events' ,
199
199
cacheHandler ,
200
200
asyncHandler ( async ( req , res , next ) => {
201
- const limit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'limit' ] ) ;
201
+ const limit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'limit' ] , 100 ) ;
202
202
const offset = parsePagingQueryInput ( req . query [ 'offset' ] ?? 0 ) ;
203
203
204
204
const principalOrTxId = parseAddressOrTxId ( req , res , next ) ;
@@ -227,7 +227,7 @@ export function createTxRouter(db: PgStore): express.Router {
227
227
return res . redirect ( '/extended/v1/tx/0x' + tx_id + url . search ) ;
228
228
}
229
229
230
- const eventLimit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'event_limit' ] ) ;
230
+ const eventLimit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'event_limit' ] , 100 ) ;
231
231
const eventOffset = parsePagingQueryInput ( req . query [ 'event_offset' ] ?? 0 ) ;
232
232
const includeUnanchored = isUnanchoredRequest ( req , res , next ) ;
233
233
validateRequestHexInput ( tx_id ) ;
@@ -276,7 +276,7 @@ export function createTxRouter(db: PgStore): express.Router {
276
276
cacheHandler ,
277
277
asyncHandler ( async ( req , res ) => {
278
278
const { block_hash } = req . params ;
279
- const limit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'limit' ] ) ;
279
+ const limit = getPagingQueryLimit ( ResourceType . Tx , req . query [ 'limit' ] , 200 ) ;
280
280
const offset = parsePagingQueryInput ( req . query [ 'offset' ] ?? 0 ) ;
281
281
validateRequestHexInput ( block_hash ) ;
282
282
const result = await db . getTxsFromBlock ( { hash : block_hash } , limit , offset ) ;
0 commit comments