Skip to content

Commit

Permalink
Merge pull request #3219 from OlympusDAO/develop
Browse files Browse the repository at this point in the history
[Release] - BugFix Resolve formatCurrency race condition
  • Loading branch information
brightiron authored Oct 11, 2024
2 parents 64656ea + 9daa9b4 commit 9f8dab9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/helpers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ export function shorten(str: string) {
}

export function formatCurrency(c: number, precision = 0, currency = "USD") {
console.log(c, precision, currency);
const formatted = new Intl.NumberFormat("en-US", {
style: currency === "USD" ? "currency" : undefined,
currency,
style: currency === "USD" || currency === "" ? "currency" : undefined,
currency: "USD",
maximumFractionDigits: precision,
minimumFractionDigits: precision,
}).format(c);
Expand Down

0 comments on commit 9f8dab9

Please sign in to comment.