From 8d7d1eca742aacb0f5064e2a23797df6ffc8f1d6 Mon Sep 17 00:00:00 2001 From: XueyuanPang-Google Date: Sun, 30 Aug 2026 22:12:28 +0800 Subject: [PATCH] fix(escrow): display accurate escrow status labels for terminal lifecycle states (#259) --- src/app/issues/[id]/page.tsx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/app/issues/[id]/page.tsx b/src/app/issues/[id]/page.tsx index 0f24a46..7c6e957 100644 --- a/src/app/issues/[id]/page.tsx +++ b/src/app/issues/[id]/page.tsx @@ -42,6 +42,26 @@ export async function generateMetadata({ }; } +function getEscrowStatusLabel(status: string): string { + switch (status) { + case "open": + return "Awaiting funding"; + case "funded": + case "claimed": + case "in_review": + case "merged": + return "Funds locked"; + case "paid": + return "Paid out"; + case "refunded": + return "Refunded to sponsor"; + case "expired": + return "Expired, unclaimed"; + default: + return "Unknown"; + } +} + export default async function IssueDetailPage({ params, }: { @@ -85,7 +105,7 @@ export default async function IssueDetailPage({ Escrow status

- {bounty.status === "open" ? "Awaiting funding" : "Funds locked"} + {getEscrowStatusLabel(bounty.status)}