mango withdraw correction

This commit is contained in:
Maximilian Schneider 2021-06-05 17:24:51 -04:00
parent 6fec35a012
commit 75454b9af4
1 changed files with 3 additions and 1 deletions

View File

@ -523,7 +523,9 @@ export async function borrowAndWithdraw(
Math.ceil(
borrowQuantity * Math.pow(10, mangoGroup.mintDecimals[tokenIndex])
)
)
).add(new BN(1))
// add a lamport to make sure that we don't run into rounding issues
// between borrow & withdraw
const borrowInstruction = makeBorrowInstruction(
programId,