Skip to content

Implement Localized Fiat Currency Conversion Display #92

Description

@Lakes41

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

  • Users can select a default currency from a dropdown in the application settings.
  • All portfolio balances, asset prices, and historical charts immediately update to reflect the chosen currency.
  • Formatting correctly respects the locale's decimal and thousands separators.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSRelated to GrantFox Open Source Software initiativesMaybe RewardedPotential for a reward based on contributionOfficial Campaign | FWC26Period after the official FIFA World Cup 2026 campaignbeginnerGood for beginnersfeatureNew feature or requesti18nInternationalization and localization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions