Skip to content

IssueDetailPage's escrow status label says "Funds locked" for paid, refunded, and expired bounties, even though funds have already left escrow in all three cases #259

Description

@chonilius

src/app/issues/[id]/page.tsx#IssueDetailPage renders the escrow status card as:

<p className="mt-2 font-medium text-slate-900 dark:text-white">
  {bounty.status === "open" ? "Awaiting funding" : "Funds locked"}
</p>

This binary ternary only distinguishes "open" (not yet funded) from every other
status, labeling all of them "Funds locked" — including "paid" (funds already released
to the contributor), "refunded" (funds already returned to the sponsor), and
"expired" (deadline passed). For all three of these terminal states, funds are
specifically not locked in escrow anymore — that's what makes them terminal — yet the
UI's dedicated "Escrow status" card tells the viewer the opposite.

A sponsor checking on a bounty they refunded weeks ago, or a contributor checking a
bounty they were already paid for, sees "Funds locked" under "Escrow status" — directly
contradicting the actual on-chain state this card exists to summarize, on the one page
in the app whose whole purpose is showing accurate escrow status for a specific bounty.

Suggested fix: expand this to a proper mapping covering all BountyStatus values —
e.g. "Awaiting funding" (open), "Funds locked" (funded/claimed/in_review/merged),
"Paid out" (paid), "Refunded to sponsor" (refunded), "Expired, unclaimed" (expired) —
instead of the current two-way open/everything-else split.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is neededvery hardVery difficult task, expert-level effort required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions