Skip to content

Commit

Permalink
Merge pull request #221 from decentraland/fix/lands-query
Browse files Browse the repository at this point in the history
fix: LANDs query
  • Loading branch information
juanmahidalgo authored Dec 13, 2024
2 parents fb52c7a + 35c9f08 commit 5157f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ports/nfts/landQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function getLANDWhereStatement(nftFilters: GetNFTsFilters): SQLStatement {
export function getLANDs(nftFilters: GetNFTsFilters): SQLStatement {
const { sortBy, isOnSale, ids, owner } = nftFilters
const NFT_OWNER_FILTER = owner
? SQL`nft.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = '${owner.toLocaleLowerCase()}')`
? SQL`nft.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = ${owner.toLowerCase()})`
: null
const ESTATE_OWNER_FILTER = owner
? SQL`est.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = '${owner.toLocaleLowerCase()}')`
? SQL`est.owner_id IN (SELECT id FROM squid_marketplace.account WHERE address = ${owner.toLowerCase()})`
: null
return SQL`
WITH filtered_land_nfts AS (
Expand Down

0 comments on commit 5157f0f

Please sign in to comment.