diff --git a/src/composables/useMarket.ts b/src/composables/useMarket.ts index d967d85..a488f70 100644 --- a/src/composables/useMarket.ts +++ b/src/composables/useMarket.ts @@ -1,4 +1,4 @@ -import { ref, computed, readonly } from 'vue' +import { ref, readonly } from 'vue' import { useNostrStore } from '@/stores/nostr' import { useMarketStore, type Market, type Stall, type Product } from '@/stores/market' import { config } from '@/lib/config' @@ -54,8 +54,6 @@ export function useMarket() { const loadMarketData = async (marketData: any) => { try { console.log('Starting loadMarketData...') - // Get Nostr client - const client = nostrStore.getClient() console.log('Got Nostr client') // Load market configuration @@ -193,7 +191,7 @@ export function useMarket() { }) // Process each stall group, keeping only the most recent version - stallGroups.forEach((stallEvents, stallId) => { + stallGroups.forEach((stallEvents, _stallId) => { // Sort by created_at timestamp (most recent first) stallEvents.sort((a, b) => b.event.created_at - a.event.created_at) @@ -263,7 +261,7 @@ export function useMarket() { }) // Process each product group, keeping only the most recent version - productGroups.forEach((productEvents, productId) => { + productGroups.forEach((productEvents, _productId) => { // Sort by created_at timestamp (most recent first) productEvents.sort((a, b) => b.event.created_at - a.event.created_at) @@ -476,20 +474,8 @@ export function useMarket() { } } - const publishProduct = async (productData: any) => { + const publishProduct = async (_productData: any) => { try { - const client = nostrStore.getClient() - - // Create unsigned event - const unsignedEvent = { - kind: MARKET_EVENT_KINDS.PRODUCT, - content: JSON.stringify(productData), - tags: [ - ['d', productData.id], - ['t', 'product'] - ], - created_at: Math.floor(Date.now() / 1000) - } // Note: This would need to be signed with the user's private key // For now, we'll just log that this function needs to be implemented @@ -501,20 +487,8 @@ export function useMarket() { } } - const publishStall = async (stallData: any) => { + const publishStall = async (_stallData: any) => { try { - const client = nostrStore.getClient() - - // Create unsigned event - const unsignedEvent = { - kind: MARKET_EVENT_KINDS.STALL, - content: JSON.stringify(stallData), - tags: [ - ['d', stallData.id], - ['t', 'stall'] - ], - created_at: Math.floor(Date.now() / 1000) - } // Note: This would need to be signed with the user's private key // For now, we'll just log that this function needs to be implemented diff --git a/src/lib/nostr/client.ts b/src/lib/nostr/client.ts index 8151288..254e4ca 100644 --- a/src/lib/nostr/client.ts +++ b/src/lib/nostr/client.ts @@ -219,7 +219,7 @@ export class NostrClient { since?: number until?: number '#d'?: string[] - } = {}): Promise { + }): Promise { const { kinds, authors, diff --git a/src/stores/market.ts b/src/stores/market.ts index cf04a46..88f8ee6 100644 --- a/src/stores/market.ts +++ b/src/stores/market.ts @@ -1,6 +1,6 @@ import { defineStore } from 'pinia' import { ref, computed, readonly } from 'vue' -import { config } from '@/lib/config' + // Types export interface Market {