From 4231fedeef4ccbcfb13010852d97e0830e6f573e Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Sat, 21 Nov 2020 14:54:17 +0800 Subject: [PATCH] fix: borrow instruction inputs --- src/models/lending/borrow.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/models/lending/borrow.ts b/src/models/lending/borrow.ts index 9708007..2909a96 100644 --- a/src/models/lending/borrow.ts +++ b/src/models/lending/borrow.ts @@ -22,7 +22,7 @@ import { LendingInstruction } from "./lending"; /// 6. `[writable]` Obligation - uninitialized /// 7. `[writable]` Obligation token mint - uninitialized /// 8. `[writable]` Obligation token output - uninitialized -/// 9. `[]` Obligation token owner - uninitialized +/// 9. `[]` Obligation token owner /// 10 `[]` Derived lending market authority ($authority). /// 11 `[]` Dex market /// 12 `[]` Dex order book side // could be bid/ask @@ -78,16 +78,16 @@ export const borrowInstruction = ( { pubkey: borrowReserveLiquiditySupply, isSigner: false, - isWritable: false, + isWritable: true, }, { pubkey: obligation, isSigner: false, isWritable: true }, { pubkey: obligationMint, isSigner: false, isWritable: true }, { pubkey: obligationTokenOutput, isSigner: false, isWritable: true }, { pubkey: obligationTokenOwner, isSigner: false, isWritable: false }, - { pubkey: lendingMarketAuthority, isSigner: false, isWritable: true }, - { pubkey: dexMarket, isSigner: false, isWritable: true }, + { pubkey: lendingMarketAuthority, isSigner: false, isWritable: false }, + { pubkey: dexMarket, isSigner: false, isWritable: false }, { pubkey: dexOrderBookSide, isSigner: false, isWritable: false }, - { pubkey: memory, isSigner: false, isWritable: true }, + { pubkey: memory, isSigner: false, isWritable: false }, { pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false }, { pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false }, { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false },