Skip to content

Commit

Permalink
[token js]: transfer-hook: align key pushing flow with Rust helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Nov 13, 2023
1 parent 9b19249 commit c1125a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token/js/src/extensions/transferHook/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 });
}
Expand Down

0 comments on commit c1125a0

Please sign in to comment.