From 8964cf86aa9e737108a3190df13a9c1d84d84293 Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Wed, 12 May 2021 17:13:40 -0500 Subject: [PATCH] nit with how we convert percent to negative value --- src/components/swap/FormattedPriceImpact.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/swap/FormattedPriceImpact.tsx b/src/components/swap/FormattedPriceImpact.tsx index 0d3840e7f4..5f1e162143 100644 --- a/src/components/swap/FormattedPriceImpact.tsx +++ b/src/components/swap/FormattedPriceImpact.tsx @@ -9,7 +9,7 @@ import { ErrorText, ErrorPill } from './styleds' export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) { return ( - {priceImpact ? `-${priceImpact.toFixed(2)}%` : '-'} + {priceImpact ? `${priceImpact.multiply(-1).toFixed(2)}%` : '-'} ) } @@ -17,7 +17,7 @@ export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Pe export function SmallFormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) { return ( - {priceImpact ? `(-${priceImpact.toFixed(2)}%)` : '-'} + {priceImpact ? `(${priceImpact.multiply(-1).toFixed(2)}%)` : '-'} ) }