From 77ac0f104d77d9f8907cbb5e4889051da3e1dcfa Mon Sep 17 00:00:00 2001 From: max <39312833+fritzschoff@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:31:11 +0100 Subject: [PATCH] fix(useundelegatebaseandromeda): if debt is bigger than 0 use repay contract (#245) --- .../useUndelegateBaseAndromeda/useUndelegateBaseAndromeda.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidity/lib/useUndelegateBaseAndromeda/useUndelegateBaseAndromeda.tsx b/liquidity/lib/useUndelegateBaseAndromeda/useUndelegateBaseAndromeda.tsx index 558772aaf..184a354ea 100644 --- a/liquidity/lib/useUndelegateBaseAndromeda/useUndelegateBaseAndromeda.tsx +++ b/liquidity/lib/useUndelegateBaseAndromeda/useUndelegateBaseAndromeda.tsx @@ -44,7 +44,7 @@ export const useUndelegateBaseAndromeda = ({ const { data: collateralPriceUpdates } = useAllCollateralPriceIds(); const { network } = useNetwork(); - const debtExists = liquidityPosition?.debt.gt(0.01); + const debtExists = liquidityPosition?.debt.gt(0); const currentDebt = debtExists && liquidityPosition ? liquidityPosition.debt : wei(0); const { approve, requireApproval } = useApprove({