From 0a23310a3407b8815c4a5a20edc1180d91d48458 Mon Sep 17 00:00:00 2001 From: Hermes Bounty Bot Date: Thu, 4 Jun 2026 22:03:31 +0000 Subject: [PATCH 1/2] fix: #401 use (~SOL) notation to prevent USD/coin amount confusion --- src/components/gigs/GigCard.test.tsx | 13 +++++++++++++ src/components/gigs/GigCard.tsx | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/gigs/GigCard.test.tsx b/src/components/gigs/GigCard.test.tsx index 5fc36540..c8c25e18 100644 --- a/src/components/gigs/GigCard.test.tsx +++ b/src/components/gigs/GigCard.test.tsx @@ -252,4 +252,17 @@ describe("GigCard", () => { render(); expect(screen.getByText(/\/article/)).toBeInTheDocument(); }); + + it("displays ~coin notation when payment_coin is set so USD value is not mistaken for coin amount", () => { + const gig = { + ...baseGig, + budget_min: 1, + budget_max: 1, + payment_coin: "SOL", + poster: mockPoster, + }; + render(); + // Should show "$1.00 USD (~SOL)" not "$1.00 USD (paid in SOL)" + expect(screen.getByText(/\$1\.00 USD \(~SOL\)/)).toBeInTheDocument(); + }); }); diff --git a/src/components/gigs/GigCard.tsx b/src/components/gigs/GigCard.tsx index f1d179a8..5bf834b1 100644 --- a/src/components/gigs/GigCard.tsx +++ b/src/components/gigs/GigCard.tsx @@ -60,7 +60,9 @@ export function GigCard({ const coin = gig.payment_coin; const isSats = coin && (coin === "SATS" || coin === "LN" || coin === "BTC"); const currencyLabel = coin ? (isSats ? "sats" : coin) : "USD"; - const coinNote = coin ? ` (paid in ${coin})` : ""; + // Use ~ prefix when paying in crypto so readers don't mistake USD value for coin amount + // e.g. "$1.00 USD (~SOL)" not "$1.00 USD (paid in SOL)" — ~ makes it clear it's an equivalent + const coinNote = coin ? ` (~${coin})` : ""; const fmt = (val: number) => { if (isSats) return `${val.toLocaleString("en-US")} sats`; From 37d1468cd813798585393fd507d6fff4b81662ed Mon Sep 17 00:00:00 2001 From: Hermes Bounty Bot Date: Thu, 4 Jun 2026 22:05:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20apply=20DeepSeek=20review=20suggesti?= =?UTF-8?q?ons=20=E2=80=94=20space=20before=20coin=20note,=20remove=20~=20?= =?UTF-8?q?prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/gigs/GigCard.test.tsx | 4 ++-- src/components/gigs/GigCard.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/gigs/GigCard.test.tsx b/src/components/gigs/GigCard.test.tsx index c8c25e18..118a9337 100644 --- a/src/components/gigs/GigCard.test.tsx +++ b/src/components/gigs/GigCard.test.tsx @@ -262,7 +262,7 @@ describe("GigCard", () => { poster: mockPoster, }; render(); - // Should show "$1.00 USD (~SOL)" not "$1.00 USD (paid in SOL)" - expect(screen.getByText(/\$1\.00 USD \(~SOL\)/)).toBeInTheDocument(); + // Should show "$1.00 USD (SOL)" not "$1.00 USD (paid in SOL)" — (SOL) not (~SOL) + expect(screen.getByText(/\$1\.00 USD \(SOL\)/)).toBeInTheDocument(); }); }); diff --git a/src/components/gigs/GigCard.tsx b/src/components/gigs/GigCard.tsx index 5bf834b1..6555bf35 100644 --- a/src/components/gigs/GigCard.tsx +++ b/src/components/gigs/GigCard.tsx @@ -62,7 +62,7 @@ export function GigCard({ const currencyLabel = coin ? (isSats ? "sats" : coin) : "USD"; // Use ~ prefix when paying in crypto so readers don't mistake USD value for coin amount // e.g. "$1.00 USD (~SOL)" not "$1.00 USD (paid in SOL)" — ~ makes it clear it's an equivalent - const coinNote = coin ? ` (~${coin})` : ""; + const coinNote = coin ? ` (${coin})` : ""; const fmt = (val: number) => { if (isSats) return `${val.toLocaleString("en-US")} sats`; @@ -77,7 +77,7 @@ export function GigCard({ } if (min && max && min !== max) return `${fmt(min)} - ${fmt(max)}${suffix}${!isSats ? coinNote : ""}`; - if (min && max) return `${fmt(min)}${suffix}${!isSats ? coinNote : ""}`; + if (min && max) return `${fmt(min)}${suffix}${!isSats ? " " + coinNote : ""}`; if (min) return `${fmt(min)}+${suffix}${!isSats ? coinNote : ""}`; if (max) return `up to ${fmt(max)}${suffix}${!isSats ? coinNote : ""}`; return (gig.budget_type === "fixed" || gig.budget_type === "bounty") ? "Budget TBD" : "Rate TBD";