Skip to content

Commit

Permalink
fix: use null instead of empty SQL statement
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Dec 12, 2024
1 parent ffe4298 commit e226378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ports/nfts/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e226378

Please sign in to comment.