diff --git a/src/actions/account.ts b/src/actions/account.ts index 0e06cda..7e6e15c 100644 --- a/src/actions/account.ts +++ b/src/actions/account.ts @@ -31,6 +31,7 @@ export function createTempMemoryAccount( instructions: TransactionInstruction[], payer: PublicKey, signers: Account[], + owner: PublicKey, space = DEFAULT_TEMP_MEM_SPACE ) { const account = new Account(); @@ -38,10 +39,10 @@ export function createTempMemoryAccount( SystemProgram.createAccount({ fromPubkey: payer, newAccountPubkey: account.publicKey, - // 0 will evict/clost account since it cannot pay rent + // 0 will evict/close account since it cannot pay rent lamports: 0, space: space, - programId: TOKEN_PROGRAM_ID, + programId: owner, }) ); diff --git a/src/actions/borrow.tsx b/src/actions/borrow.tsx index 88963ee..220b7c8 100644 --- a/src/actions/borrow.tsx +++ b/src/actions/borrow.tsx @@ -170,7 +170,7 @@ export const borrow = async ( ? dexMarket?.info.asks : dexMarket?.info.bids; - const memory = createTempMemoryAccount(instructions, wallet.publicKey, signers); + const memory = createTempMemoryAccount(instructions, wallet.publicKey, signers, LENDING_PROGRAM_ID); // Creates host fee account if it doesn't exsist let hostFeeReceiver = LEND_HOST_FEE_ADDRESS diff --git a/src/actions/liquidate.tsx b/src/actions/liquidate.tsx index 287e6df..0577ff7 100644 --- a/src/actions/liquidate.tsx +++ b/src/actions/liquidate.tsx @@ -90,7 +90,7 @@ export const liquidate = async ( ? dexMarket?.info.asks : dexMarket?.info.bids; - const memory = createTempMemoryAccount(instructions, wallet.publicKey, signers); + const memory = createTempMemoryAccount(instructions, wallet.publicKey, signers, LENDING_PROGRAM_ID); instructions.push( liquidateInstruction(