diff --git a/src/components/Modals/BorrowModal.tsx b/src/components/Modals/BorrowModal.tsx index 88fe5796..193674ee 100644 --- a/src/components/Modals/BorrowModal.tsx +++ b/src/components/Modals/BorrowModal.tsx @@ -113,7 +113,7 @@ function BorrowModal(props: Props) { const marketCapAfterOverpay = marketAsset.cap.used.plus(overpayAmount) return marketAsset.cap.max.isLessThanOrEqualTo(marketCapAfterOverpay) - }, [marketAssets, asset.denom]) + }, [marketAssets, asset.denom, totalDebt, totalDebtRepayAmount]) const maxRepayAmount = useMemo(() => { const maxBalance = repayFromWallet @@ -127,6 +127,8 @@ function BorrowModal(props: Props) { lendBalance, isRepay, totalDebtRepayAmount, + overpayExeedsCap, + totalDebt, walletBalances, asset.denom, repayFromWallet,