diff --git a/src/ports/nfts/queries.ts b/src/ports/nfts/queries.ts index 6eb8b36..cdbabfa 100644 --- a/src/ports/nfts/queries.ts +++ b/src/ports/nfts/queries.ts @@ -115,7 +115,7 @@ function getFilteredNFTCTE(nftFilters: GetNFTsFilters, uncapped = false): SQLSta function getFilteredEstateCTE(filters: GetNFTsFilters): SQLStatement { const FILTER_BY_OWNER = filters.owner ? SQL` est.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = ${filters.owner.toLocaleLowerCase()}) ` - : SQL`` + : null const FILTER_MIN_ESTATE_SIZE = filters.minEstateSize ? SQL` est.size >= ${filters.minEstateSize} ` : SQL` est.size > 0 ` const FILTER_MAX_ESTATE_SIZE = filters.maxEstateSize ? SQL` est.size <= ${filters.maxEstateSize} ` : null