From 1f1fb58724f7591dcc53dc5dfcb054bd968ad568 Mon Sep 17 00:00:00 2001 From: 0xdef1cafe <88504456+0xdef1cafe@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:40:07 +1100 Subject: [PATCH] chore: fix total fee --- src/components/FeeExplainer/FeeExplainer.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/FeeExplainer/FeeExplainer.tsx b/src/components/FeeExplainer/FeeExplainer.tsx index 04f1b7e9b65..ff72cea7b5e 100644 --- a/src/components/FeeExplainer/FeeExplainer.tsx +++ b/src/components/FeeExplainer/FeeExplainer.tsx @@ -274,24 +274,23 @@ type FeeOutputProps = { } export const FeeOutput: React.FC = ({ tradeSize, foxHolding }) => { - const { feeBps, feeUsd, feeUsdDiscount, foxDiscountPercent } = calculateFees({ + const { feeBps, feeUsd, foxDiscountPercent } = calculateFees({ tradeAmountUsd: bn(tradeSize), foxHeld: bn(foxHolding), }) - const totalFee = useMemo(() => feeUsd.minus(feeUsdDiscount), [feeUsd, feeUsdDiscount]) return ( - {totalFee.lte(0) ? ( + {feeUsd.lte(0) ? ( Free ) : ( )}