only borrow if toggle is true in modal

This commit is contained in:
Tyler Shipe 2021-04-22 13:31:09 -04:00
parent a23eff8d9c
commit 7d26ec8fac
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ const WithdrawModal = ({ isOpen, onClose }) => {
const wallet = useMangoStore.getState().wallet.current
if (!marginAccount || !mangoGroup) return
if (Number(inputAmount) <= getMaxForSelectedAccount()) {
if (!includeBorrow) {
withdraw(
connection,
programId,