only borrow if toggle is true in modal
This commit is contained in:
parent
a23eff8d9c
commit
7d26ec8fac
|
@ -101,7 +101,7 @@ const WithdrawModal = ({ isOpen, onClose }) => {
|
||||||
const wallet = useMangoStore.getState().wallet.current
|
const wallet = useMangoStore.getState().wallet.current
|
||||||
if (!marginAccount || !mangoGroup) return
|
if (!marginAccount || !mangoGroup) return
|
||||||
|
|
||||||
if (Number(inputAmount) <= getMaxForSelectedAccount()) {
|
if (!includeBorrow) {
|
||||||
withdraw(
|
withdraw(
|
||||||
connection,
|
connection,
|
||||||
programId,
|
programId,
|
||||||
|
|
Loading…
Reference in New Issue