feat(treasury): show fiat in R$ on the pt-BR locale - #2
Closed
sktbrd wants to merge 2 commits into
Closed
Conversation
…opunk#273) * wip(treasury): Token Holdings to the right column, NFT grid full width Sponsorship left ~280px of dead space; Token Holdings (three rows) fills it, and its old half-width row goes to the NFT grid — the one section where width is the feature. Preview grows 7 -> 15 + the +N tile: two complete 8-column rows at sm+, four complete 4-column rows on mobile, no holes at either breakpoint. WIP: compiles clean (tsc/eslint/prettier), structure confirmed rendering (Token Holdings in the right column, NFT section full width), but a clean LOADED capture was not obtained - dev-server recompiles kept catching the page mid-stream. Do not merge without the capture. * fix(treasury): two-line token rows so values fit the narrow column The three-column table clipped its Value column once Token Holdings moved into the right-hand column. Stacked value-over-amount rows fit any width; the now-unused table header keys are dropped from both locales. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Every USD figure on the treasury page — total value KPI, allocation bar, token holdings values, sponsorship TVL/yield — converts to BRL on pt-br at one server-cached USD→BRL rate (open.er-api.com, 1h unstable_cache; errors are not cached so a miss retries next request). Token quantities never convert: a USDC position's USD value multiplies by the rate like everything else — 1 USDC is not R$ 1. If the rate fetch fails the page keeps US$ figures and each affected card says so out loud (FiatFallbackNote) instead of silently showing stale reais. EN is untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Superseded: r4topunk#273 was squash-merged upstream, so this branch was rebased onto r4topunk/main and re-opened as an upstream PR. |
sktbrd
force-pushed
the
feat/treasury-brl-locale
branch
from
August 18, 2026 15:50
a853b33 to
70435a3
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/pt-br/treasury, every fiat figure converts USD→BRL at one server-cached rate and renders as R$ (pt-BR conventions). EN is untouched.Changes
src/services/exchange-rate.ts— open.er-api.com/v6/latest/USD (keyless),unstable_cache1h; failures throw inside the cached fn so misses aren't pinned for an hour;getBrlRateForRequest()returns the rate only on pt-br, React-cached per requestsrc/lib/i18n/fiat.ts+ tests — purelocalizeFiat/formatFiatUsdFiatFallbackNote.tsx— the visible USD-fallback indicatorTreasuryBalance(Client),TokenHoldings(Client),TreasuryAllocation,SponsorshipYield,page.tsxmessages/{en,pt-br}/treasury.json—fiat.usdFallbackin both localesTest plan
pnpm test— 141 passed (8 new, incl. the 1-USDC≠R$1 case)Stacked on r4topunk#273's branch (
feat/treasury-column-layout).Generated with Claude Code