feat(frontend): simplify claim-cost + Kumbaya buy link + USD hint (GitLab #206) #389
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega!389
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/glab-206-claim-cost-kumbaya-link-usd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #206.
What this changes
Three sub-deliverables per the spec, all on the referrals register card:
Simplify claim cost display. Drop the
AmountDisplaytriple-stack (with "decimal" and "abbr" row labels) in favor of a single readable line:1 CL8Y. UsesformatAmountTriple(...).decimalinline so onchain-decimals stays correct without the noisy abbr / decimal scaffolding.Buy CL8Y on Kumbaya link. Centralized URL helper at
frontend/src/lib/kumbayaSwapUrl.tsthat builds the swap URL with the canonical CL8Y address asoutputCurrency(sourced live fromReferralRegistry.cl8yToken(), since CL8Y isn't currently inaddresses.ts). UseskumbayaDexUrl()for the base when env is set, falls back tohttps://www.kumbaya.xyz/#/swapotherwise. Link usestarget="_blank"+rel="noreferrer noopener"per spec.USD hint with documented product rule. Uses the existing illustrative placeholder pattern (
CL8Y_USD_PRICE_PLACEHOLDER = 1fromarenaPageHelpers.ts, same as the Arena hero "TOTAL USD"). Shows≈ $1.00 USD · illustrativeunder the cost. Inline code comment documents which pattern was chosen and why (matchescl8yUsdEquivalentDisplay.tsdisclosure language for #192). Tooltip clarifies it's not live FX.Tests
New
frontend/src/lib/kumbayaSwapUrl.test.ts— 4 cases:outputCurrencywhen token address is providedVITE_KUMBAYA_DEX_URLwhen setSuite delta: 325/325 → 329/329 across 59 → 60 files (+4 tests, +1 file). Zero regressions.
Manual verification
Tested locally pointed at MegaETH mainnet (chain 4326, real ReferralRegistry):
1 CL8Yas a single readable line (no DECIMAL/ABBR rows)≈ $1.00 USD · illustrativewith tooltip explaining it's a fixed placeholderBuy CL8Y on Kumbayabutton opens new tab tohttps://www.kumbaya.xyz/#/swap?outputCurrency=0xfBAa45A537cF07dC768c469FfaC4e88208B0098D&confirmed=1noreferrer noopener— no referer leak to KumbayaOut of scope
AmountTripleStackwith the same decimal/abbr noise — flagged in a separate note on this issue. This MR scopes to.referrals-register-costonly as the spec asks.mentioned in commit
a0fbe57718