Background
Asset balances and TVL (Total Value Locked) metrics are strictly hardcoded to display in USD ($) or the native crypto token amount.
Problem
International users lack context for their portfolio value, forcing them to manually calculate conversions to their local fiat currency.
Expected Outcome
A global application setting that allows users to toggle their preferred base currency (e.g., EUR, GBP, JPY, CAD), instantly recalculating and re-rendering all fiat values across the UI.
Suggested Implementation
- Integrate a reliable fiat exchange rate API (e.g., CoinGecko or a custom backend proxy) to fetch live FX rates against USD.
- Create a
useFiatCurrency hook/store to track the selected currency.
- Create a
CurrencyFormatter utility that applies proper localized formatting (e.g., €1.234,56 vs $1,234.56) using the Intl.NumberFormat API.
Acceptance Criteria
Likely Affected Files
src/store/currencyStore.ts
src/utils/formatters.ts
src/components/Settings/CurrencySelector.tsx
Requirements
- Exchange rates must be cached locally to prevent rate-limiting from the price oracle API.
Background
Asset balances and TVL (Total Value Locked) metrics are strictly hardcoded to display in USD ($) or the native crypto token amount.
Problem
International users lack context for their portfolio value, forcing them to manually calculate conversions to their local fiat currency.
Expected Outcome
A global application setting that allows users to toggle their preferred base currency (e.g., EUR, GBP, JPY, CAD), instantly recalculating and re-rendering all fiat values across the UI.
Suggested Implementation
useFiatCurrencyhook/store to track the selected currency.CurrencyFormatterutility that applies proper localized formatting (e.g.,€1.234,56vs$1,234.56) using theIntl.NumberFormatAPI.Acceptance Criteria
Likely Affected Files
src/store/currencyStore.tssrc/utils/formatters.tssrc/components/Settings/CurrencySelector.tsxRequirements