FIX: remove erroneously created kind 30020 relevant code which is not and ORDER event

This commit is contained in:
padreug 2025-09-14 16:03:31 +02:00
parent 98544e2e79
commit 47d81f862c

View file

@ -11,8 +11,7 @@ import { auth } from '@/composables/useAuthService'
const MARKET_EVENT_KINDS = {
MARKET: 30019,
STALL: 30017,
PRODUCT: 30018,
ORDER: 30020
PRODUCT: 30018
} as const
export function useMarket() {
@ -331,8 +330,7 @@ export function useMarket() {
filters: [
{ kinds: [MARKET_EVENT_KINDS.MARKET] },
{ kinds: [MARKET_EVENT_KINDS.STALL] },
{ kinds: [MARKET_EVENT_KINDS.PRODUCT] },
{ kinds: [MARKET_EVENT_KINDS.ORDER] }
{ kinds: [MARKET_EVENT_KINDS.PRODUCT] }
],
onEvent: (event: any) => {
handleMarketEvent(event)
@ -427,10 +425,6 @@ export function useMarket() {
// Handle product updates
handleProductEvent(event)
break
case MARKET_EVENT_KINDS.ORDER:
// Handle order updates
handleOrderEvent(event)
break
}
}
@ -497,31 +491,6 @@ export function useMarket() {
}
}
// Handle order events
const handleOrderEvent = (_event: any) => {
try {
// const orderData = JSON.parse(event.content)
// const order = {
// id: event.id,
// stall_id: orderData.stall_id || 'unknown',
// product_id: orderData.product_id || 'unknown',
// buyer_pubkey: event.pubkey,
// seller_pubkey: orderData.seller_pubkey || '',
// quantity: orderData.quantity || 1,
// total_price: orderData.total_price || 0,
// currency: orderData.currency || 'sats',
// status: orderData.status || 'pending',
// payment_request: orderData.payment_request,
// created_at: event.created_at,
// updated_at: event.created_at
// }
// Note: addOrder method doesn't exist in the store, so we'll just handle it silently
} catch (err) {
// Silently handle order event errors
}
}
// Publish a product
const publishProduct = async (_productData: any) => {
// Implementation would depend on your event creation logic