From c1125a07ad898c808546b1cf86c4857383b6f18a Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 13 Nov 2023 12:38:33 +0000 Subject: [PATCH] [token js]: transfer-hook: align key pushing flow with Rust helpers --- token/js/src/extensions/transferHook/instructions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token/js/src/extensions/transferHook/instructions.ts b/token/js/src/extensions/transferHook/instructions.ts index 0b722178975..9484a3053c0 100644 --- a/token/js/src/extensions/transferHook/instructions.ts +++ b/token/js/src/extensions/transferHook/instructions.ts @@ -172,7 +172,6 @@ export async function addExtraAccountsToInstruction( const extraAccountMetas = getExtraAccountMetas(extraAccountsInfo); const accountMetas = instruction.keys; - accountMetas.push({ pubkey: extraAccountsAccount, isSigner: false, isWritable: false }); for (const extraAccountMeta of extraAccountMetas) { const accountMetaUnchecked = await resolveExtraAccountMeta( @@ -186,6 +185,7 @@ export async function addExtraAccountsToInstruction( accountMetas.push(accountMeta); } accountMetas.push({ pubkey: transferHook.programId, isSigner: false, isWritable: false }); + accountMetas.push({ pubkey: extraAccountsAccount, isSigner: false, isWritable: false }); return new TransactionInstruction({ keys: accountMetas, programId, data: instruction.data }); }