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