diff --git a/desktop/src/features/market/lib/marketProtocol.ts b/desktop/src/features/market/lib/marketProtocol.ts index a27f3c04df..9629cf43ef 100644 --- a/desktop/src/features/market/lib/marketProtocol.ts +++ b/desktop/src/features/market/lib/marketProtocol.ts @@ -36,6 +36,7 @@ const AnnouncementEnvelope = BaseEnvelope.extend({ closesAt: PositiveInteger.optional(), deliveryMinutes: PositiveInteger.optional(), minimumDecrementSats: PositiveInteger.optional(), + imageUrl: z.string().url().max(500).optional(), }), }); @@ -522,6 +523,7 @@ export function projectMarketChannel( eyebrow: `${listing.listing.direction === "offer" ? "Offer" : "Request"} · ${listing.listing.mechanism.replace("-", " ")} · ${quantity === "unlimited" ? "unlimited" : "finite"}`, title: listing.listing.title, summary: listing.listing.summary, + imageUrl: listing.listing.imageUrl, direction: listing.listing.direction === "offer" ? `Buyer pays ${listingPrice(listing.listing)} · Seller delivers` diff --git a/desktop/src/features/market/lib/marketPrototypeData.ts b/desktop/src/features/market/lib/marketPrototypeData.ts index 8a4496ccc0..f0c772ca61 100644 --- a/desktop/src/features/market/lib/marketPrototypeData.ts +++ b/desktop/src/features/market/lib/marketPrototypeData.ts @@ -26,6 +26,7 @@ export type MarketScenario = { direction: string; eyebrow: string; id: MarketScenarioId; + imageUrl?: string; liveMetrics: MarketTerm[]; mode: string; primaryAction: string; diff --git a/desktop/src/features/market/ui/MarketContractCard.tsx b/desktop/src/features/market/ui/MarketContractCard.tsx index d3da5555f3..47de0c54cd 100644 --- a/desktop/src/features/market/ui/MarketContractCard.tsx +++ b/desktop/src/features/market/ui/MarketContractCard.tsx @@ -1,6 +1,7 @@ import { Bot, PackageCheck, Radio, Store } from "lucide-react"; import type { MarketScenario } from "@/features/market/lib/marketPrototypeData"; +import { rewriteRelayUrl } from "@/shared/lib/mediaUrl"; import { Badge } from "@/shared/ui/badge"; const COMMERCIAL_TERM_LABELS = new Set(["Price", "Reward", "Initial quantity"]); @@ -20,8 +21,17 @@ export function MarketContractCard({ scenario }: { scenario: MarketScenario }) { data-testid="market-contract-card" >