From 043b155527c28a9a2f56b73e2f0b6f9bb78820de Mon Sep 17 00:00:00 2001 From: sealer3 <125761775+sealer3@users.noreply.github.com> Date: Thu, 25 Apr 2024 02:32:18 +0100 Subject: [PATCH] Ensure negative sign is left of the dollar sign --- src/components/FiatValue.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/FiatValue.tsx b/src/components/FiatValue.tsx index 4c55a1eb2..836257fcb 100644 --- a/src/components/FiatValue.tsx +++ b/src/components/FiatValue.tsx @@ -75,7 +75,13 @@ const FiatValue: FC = ({ bgColor ?? "" } text-xs ${fgColor ?? ""}`} > - ${formatFiatValue(value, decimals)} + {value.isNegative() ? - : null}$ + + {formatFiatValue( + value.isNegative() ? value.mul(FixedNumber.fromValue(-1n)) : value, + decimals, + )} + );