Skip to content

Commit

Permalink
Merge pull request #192 from decentraland/feat/orders-query
Browse files Browse the repository at this point in the history
feat: fix item_id filter in the orders query
  • Loading branch information
juanmahidalgo authored Dec 8, 2024
2 parents ccaeb08 + e4a6d68 commit 503e0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ports/orders/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function getOrderAndTradeQueries(filters: OrderFilters & { nftIds?: strin
const FILTER_BY_TOKEN_ID = filters.tokenId ? SQL` token_id = ${filters.tokenId} ` : null
const FILTER_BY_STATUS = filters.status ? SQL` status = ${filters.status} ` : null
const FILTER_BY_NETWORK = filters.network ? SQL` network = ANY(${getDBNetworks(filters.network)}) ` : null
const FILTER_BY_ITEM_ID = filters.itemId ? SQL` item_id = ${filters.itemId} ` : null
const FILTER_BY_ITEM_ID = filters.itemId ? SQL` item_id = ${`${filters.contractAddress}-${filters.itemId}`} ` : null
const FILTER_BY_NFT_NAME = filters.nftName ? SQL` LOWER(nft_name) = LOWER(${filters.nftName}) ` : null
const FILTER_BY_NFT_ID = filters.nftIds ? SQL` nft_id = ANY(${filters.nftIds}) ` : null
const FILTER_NOT_EXPIRED = SQL` expires_at > EXTRACT(EPOCH FROM now()::timestamptz(3)) `
Expand Down

0 comments on commit 503e0cc

Please sign in to comment.