From e730c5395373664d26cfe2288ba4d562556cdf66 Mon Sep 17 00:00:00 2001 From: ArturHoncharuk <73081258+ArturHoncharuk@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:40:36 +0200 Subject: [PATCH] fix: solve wrong behavior of swap balance when trade isn't exact in --- src/features/swap/components/composite/balance/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/swap/components/composite/balance/index.tsx b/src/features/swap/components/composite/balance/index.tsx index a76857a3..381072ff 100644 --- a/src/features/swap/components/composite/balance/index.tsx +++ b/src/features/swap/components/composite/balance/index.tsx @@ -88,7 +88,8 @@ export const Balance = ({ type }: BalanceProps) => { }, [isUSDPriceNegative]); const error = useMemo(() => { - if (!bnBalanceAmount || !selectedTokensAmount[type]) return false; + if (!_refExactGetter || !bnBalanceAmount || !selectedTokensAmount[type]) + return false; const bnInputBalance = bnBalanceAmount?._hex; const bnSelectedAmount = ethers.utils.parseEther(