Skip to content

feat: Add localized number formatting for different fiat currencies #80

@AlAfiz

Description

@AlAfiz

Description

Our utility currently formats all balances in US Dollars ($).
As we prepare for a global user base, we need our formatter to support different locales (like Euros or GBP).
We need to update our numberFormat utility to accept an optional currency string and format it accordingly.
This makes the platform instantly more accessible to non-US users.

Requirements

  • Update the formatToUSD utility function and rename it to formatCurrency(amount, currencyCode).
  • Default the currencyCode parameter to 'USD'.
  • Use Intl.NumberFormat with the dynamic currency code.
  • Test the function by displaying one dummy metric on the dashboard in Euros (EUR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions