diff --git a/src/ports/catalog/queries.ts b/src/ports/catalog/queries.ts index 1f5707c..efce430 100644 --- a/src/ports/catalog/queries.ts +++ b/src/ports/catalog/queries.ts @@ -696,7 +696,7 @@ export const getCollectionsItemsCatalogQueryWithTrades = (filters: CatalogQueryF SQL`.order AS orders WHERE orders.status = 'open' - AND orders.expires_at_normalized > NOW() AND nft.owner_address = orders.owner` + AND orders.expires_at_normalized > NOW() AND nft.owner_address = orders.owner AND nft.owner_address = orders.owner` ) ) .append(getOrderRangePriceWhere(filters)) diff --git a/src/ports/orders/queries.ts b/src/ports/orders/queries.ts index 4a34f62..f52bd92 100644 --- a/src/ports/orders/queries.ts +++ b/src/ports/orders/queries.ts @@ -109,7 +109,7 @@ export function getLegacyOrdersQuery(): string { ord.expires_at, ord.network FROM squid_marketplace."order" ord - JOIN squid_marketplace."nft" nft ON ord.nft_id = nft.id` + JOIN squid_marketplace."nft" nft ON ord.nft_id = nft.id AND nft.owner_address = ord.owner` } export interface OrderQueries {