diff --git a/src/modules/nostr-feed/components/RideshareComposer.vue b/src/modules/nostr-feed/components/RideshareComposer.vue index 9df607b..82bef88 100644 --- a/src/modules/nostr-feed/components/RideshareComposer.vue +++ b/src/modules/nostr-feed/components/RideshareComposer.vue @@ -130,21 +130,22 @@ - {{ watchedType === 'offering' ? 'Price per person' : 'Willing to pay' }} + {{ watchedType === 'offering' ? 'Price per person (sats)' : 'Willing to pay (sats)' }}
- $ + + sats
- {{ watchedType === 'offering' ? 'Cost per passenger (optional)' : 'Maximum you\'re willing to pay (optional)' }} + {{ watchedType === 'offering' ? 'Cost per passenger in satoshis (optional)' : 'Maximum satoshis you\'re willing to pay (optional)' }}
@@ -271,7 +272,7 @@ const rideshareSchema = toTypedSchema(z.object({ ), time: z.string().min(1, "Time is required"), seats: z.string().optional(), - price: z.string().optional(), + price: z.number().int().min(0, "Price must be positive").optional().or(z.literal('')).transform(val => val === '' ? undefined : val), details: z.string().max(200, "Details too long").optional(), contactMethod: z.enum(['nostr-dm', 'replies', 'other']).optional(), })) @@ -286,7 +287,7 @@ const form = useForm({ date: '', time: '', seats: '', - price: '', + price: undefined as number | undefined, details: '', contactMethod: 'nostr-dm' } @@ -327,7 +328,7 @@ const generateRideshareContent = (values: any): string => { if (values.price) { const priceLabel = values.type === 'offering' ? 'Price per person' : 'Willing to pay' - content += `💰 ${priceLabel}: $${values.price}\n` + content += `💰 ${priceLabel}: ${values.price} sats\n` } if (values.contactMethod) {