Skip to content

Clarify payout wording for coin-denominated bounties#413

Open
Rovynhq wants to merge 2 commits into
profullstack:masterfrom
Rovynhq:master
Open

Clarify payout wording for coin-denominated bounties#413
Rovynhq wants to merge 2 commits into
profullstack:masterfrom
Rovynhq:master

Conversation

@Rovynhq
Copy link
Copy Markdown

@Rovynhq Rovynhq commented Jun 5, 2026

Closes #401

Summary

  • update the shared formatBountyPayout helper so coin-denominated payouts read as Pays $X.XX USD in COIN
  • keep the payout semantics unchanged while removing the easy misread of $1.00 USD (paid in SOL) as 1 SOL
  • preserve the existing single-source-of-truth path already used by the bounty list, detail, and dashboard views

Why this fix

The existing label is technically correct, but it front-loads the dollar amount and then appends the coin in parentheses, which makes payout_usd: 1, payment_coin: "SOL" easy to misread as 1 SOL.

The new wording keeps the same underlying data and avoids implying that the numeric amount belongs to the coin itself.

Scope

  • src/lib/bounties.ts

Because the existing pages already call the shared formatter, no call-site changes were needed for the list/detail/dashboard views.

Validation

  • confirmed formatBountyPayout is the shared helper used by the bounty browse page, bounty detail page, and dashboard submissions/created views
  • verified the change is display-only and does not alter payout values or storage fields

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 5, 2026

Greptile Summary

This PR updates formatBountyPayout in src/lib/bounties.ts to prefix the output with "Pays" and restructure coin-denominated labels from "$X.XX USD (paid in COIN)" to "Pays $X.XX USD in COIN", reducing the risk of misreading the dollar amount as the coin amount.

  • The formatter change is display-only and does not affect stored payout values or business logic.
  • The new "Pays" prefix is now applied to both the coin and non-coin branches, which keeps them consistent with each other — however, one existing call site in the dashboard (page.tsx line 260) appends a literal payout suffix after the formatter result, producing the redundant label "Pays $2.00 USD in SOL payout".

Confidence Score: 4/5

Safe to merge after fixing the dashboard submissions call site that appends " payout" after the formatter output.

The formatter change itself is correct and display-only. The problem is that one call site in the dashboard submissions view hard-codes a trailing " payout" word that was natural with the old format but now collides with the new "Pays" prefix, rendering "Pays $2.00 USD in SOL payout" to users.

src/app/dashboard/bounties/page.tsx — the submissions list at line 260 appends a literal " payout" suffix that conflicts with the new formatter prefix.

Important Files Changed

Filename Overview
src/lib/bounties.ts Formatter updated to prefix both coin and non-coin paths with "Pays"; wording is clearer but causes a redundant "Pays … payout" label at one dashboard call site.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[formatBountyPayout called] --> B{paymentCoin set?}
    B -- yes --> C["Returns: 'Pays $X.XX USD in COIN'"]
    B -- no --> D["Returns: 'Pays $X.XX USD'"]
    C --> E[bounty browse page]
    C --> F[bounty detail PriceBox]
    C --> G["dashboard created list"]
    C --> H["dashboard submissions list\n+ literal ' payout' appended\n→ 'Pays $X.XX USD in COIN payout'"]
    D --> E
    D --> F
    D --> G
    D --> H
Loading

Reviews (2): Last reviewed commit: "Make bounty payout label format consiste..." | Re-trigger Greptile

Comment thread src/lib/bounties.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Bounty payout display is misleading when payment_coin is set

1 participant