add settle borrows instruction to borrowAndWithdraw
This commit is contained in:
parent
767facf575
commit
c1882c49f1
|
@ -410,6 +410,16 @@ export async function borrowAndWithdraw(
|
|||
)
|
||||
transaction.add(withdrawInstruction)
|
||||
|
||||
const settleBorrowInstruction = makeSettleBorrowInstruction(
|
||||
programId,
|
||||
mangoGroup.publicKey,
|
||||
marginAccount.publicKey,
|
||||
wallet.publicKey,
|
||||
tokenIndex,
|
||||
nativeWithdrawQuantity
|
||||
)
|
||||
transaction.add(settleBorrowInstruction)
|
||||
|
||||
const signers = []
|
||||
const functionName = 'Borrow And Withdraw'
|
||||
const sendingMessage = `Sending ${functionName} instruction...`
|
||||
|
|
Loading…
Reference in New Issue