remove percent reduction in borrow and withdraw transaction
This commit is contained in:
parent
825d586631
commit
64437f6a85
|
@ -77,7 +77,9 @@ const WithdrawModal = ({ isOpen, onClose }) => {
|
|||
selectedMangoGroup,
|
||||
prices
|
||||
)
|
||||
const assetsVal = assetsValBeforeTokenBal - getMaxForSelectedAccount()
|
||||
const assetsVal =
|
||||
assetsValBeforeTokenBal - getMaxForSelectedAccount() * prices[tokenIndex]
|
||||
|
||||
const currentLiabs = selectedMarginAccount.getLiabsVal(
|
||||
selectedMangoGroup,
|
||||
prices
|
||||
|
|
|
@ -411,7 +411,7 @@ export async function borrowAndWithdraw(
|
|||
const nativeWithdrawQuantity = new BN(
|
||||
Math.floor(
|
||||
withdrawQuantity * Math.pow(10, mangoGroup.mintDecimals[tokenIndex])
|
||||
) * 0.98
|
||||
)
|
||||
)
|
||||
|
||||
const withdrawInstruction = makeWithdrawInstruction(
|
||||
|
|
Loading…
Reference in New Issue