diff --git a/src/ports/nfts/queries.ts b/src/ports/nfts/queries.ts index 8c1dd13..2340f7e 100644 --- a/src/ports/nfts/queries.ts +++ b/src/ports/nfts/queries.ts @@ -117,7 +117,9 @@ function getFilteredNFTCTE(nftFilters: GetNFTsFilters, uncapped = false): SQLSta ` .append(whereClause) .append(getNFTsSortByStatement(nftFilters.sortBy)) - .append(uncapped || nftFilters.sortBy === NFTSortBy.RECENTLY_LISTED ? SQL`` : getNFTLimitAndOffsetStatement(nftFilters)) + .append( + uncapped || nftFilters.sortBy === NFTSortBy.RECENTLY_LISTED || !!nftFilters.owner ? SQL`` : getNFTLimitAndOffsetStatement(nftFilters) + ) .append(SQL`)`) } diff --git a/src/ports/orders/queries.ts b/src/ports/orders/queries.ts index 8043d77..3a9ec62 100644 --- a/src/ports/orders/queries.ts +++ b/src/ports/orders/queries.ts @@ -27,14 +27,14 @@ function getOrdersSortByStatement(filters: OrderFilters): SQLStatement { } function getOrdersLimitAndOffsetStatement(filters: OrderFilters) { - const limit = filters?.first ? filters.first : 100 + const limit = filters?.first ? filters.first : 1000 const offset = filters?.skip ? filters.skip : 0 return SQL` LIMIT ${limit} OFFSET ${offset} ` } function getInnerOrdersLimitAndOffsetStatement(filters: OrderFilters) { - const finalLimit = filters?.first ? filters.first : 100 + const finalLimit = filters?.first ? filters.first : 1000 const finalOffset = filters?.skip ? filters.skip : 0 // For inner queries, we need to fetch enough records to account for the final offset