From 35c9f08e2dcca364addd043f577c20c4187ad090 Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Fri, 13 Dec 2024 15:15:22 +0100 Subject: [PATCH] fix: LANDs query --- src/ports/nfts/landQueries.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ports/nfts/landQueries.ts b/src/ports/nfts/landQueries.ts index 5ef8a85..d38f9a9 100644 --- a/src/ports/nfts/landQueries.ts +++ b/src/ports/nfts/landQueries.ts @@ -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 (