From 9a0945800d2499a7fa02012e230ce75bc712b82f Mon Sep 17 00:00:00 2001 From: brightiron Date: Fri, 11 Oct 2024 10:17:08 -0500 Subject: [PATCH] resolve race condition on rbs chart --- src/helpers/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/index.tsx b/src/helpers/index.tsx index 7beabc257..1e70ae65b 100644 --- a/src/helpers/index.tsx +++ b/src/helpers/index.tsx @@ -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);