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
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
numberFormatutility to accept an optional currency string and format it accordingly.This makes the platform instantly more accessible to non-US users.
Requirements
formatToUSDutility function and rename it toformatCurrency(amount, currencyCode).currencyCodeparameter to'USD'.Intl.NumberFormatwith the dynamic currency code.EUR).