diff --git a/src/composables/useMarket.ts b/src/composables/useMarket.ts index 5cb6c8d..e494f0e 100644 --- a/src/composables/useMarket.ts +++ b/src/composables/useMarket.ts @@ -170,14 +170,12 @@ export function useMarket() { try { const client = nostrStore.getClient() - console.log('Loading stalls for market pubkey:', marketPubkey) + console.log('Loading all stalls from all authors') - // Fetch stall events for this market - // Note: We need to fetch all stalls and then filter by the ones that belong to this market - // since stalls don't have a direct market association in their tags + // Fetch all stall events from all authors + // We'll filter by market membership in the application logic const events = await client.fetchEvents({ - kinds: [MARKET_EVENT_KINDS.STALL], - authors: [marketPubkey] + kinds: [MARKET_EVENT_KINDS.STALL] }) console.log('Found stall events:', events.length) @@ -237,23 +235,13 @@ export function useMarket() { try { const client = nostrStore.getClient() - // Get all stall pubkeys - const stallPubkeys = marketStore.stalls.map(stall => stall.pubkey) - - console.log('Loading products for stall pubkeys:', stallPubkeys) - - if (stallPubkeys.length === 0) { - console.log('No stalls found, skipping product loading') - return - } - - // Fetch product events from all stalls + // Fetch all product events from all authors + // We'll filter by stall membership in the application logic const events = await client.fetchEvents({ - kinds: [MARKET_EVENT_KINDS.PRODUCT], - authors: stallPubkeys + kinds: [MARKET_EVENT_KINDS.PRODUCT] }) - console.log('Found product events:', events.length) + console.log('Found product events from all authors:', events.length) // Group events by product ID and keep only the most recent version const productGroups = new Map()