fix vault balance in withdraw modal
This commit is contained in:
parent
d0875ba345
commit
cb3cc9b169
|
@ -35,10 +35,7 @@ const getMaxWithdrawWithoutBorrow = (
|
|||
mangoAccount: MangoAccount
|
||||
): number => {
|
||||
const accountBalance = mangoAccount?.getTokenBalanceUi(bank)
|
||||
const vaultBalance = floorToDecimal(
|
||||
bank.uiDeposits() - bank.uiBorrows(),
|
||||
bank.mintDecimals
|
||||
)
|
||||
const vaultBalance = group.getTokenVaultBalanceByMintUi(bank.mint)
|
||||
const maxBorrow = mangoAccount?.getMaxWithdrawWithBorrowForTokenUi(
|
||||
group,
|
||||
bank.mint
|
||||
|
|
Loading…
Reference in New Issue