Skip to content

Commit

Permalink
fix(useundelegatebaseandromeda): if debt is bigger than 0 use repay c…
Browse files Browse the repository at this point in the history
…ontract (#245)
  • Loading branch information
fritzschoff authored Apr 18, 2024
1 parent 169e157 commit 77ac0f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 77ac0f1

Please sign in to comment.