Skip to content

Commit

Permalink
token-js: refactor to follow other transfer hook naming patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Jan 9, 2024
1 parent 3c1b045 commit 79a5fa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions token/js/src/extensions/transferHook/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ async function resolveExtraAccountMetasForTransfer(
*
* @return Instruction to add to a transaction
*/
export async function createTransferCheckedWithTransferHookInstruction(
export async function createTransferCheckedInstructionWithExtraMetas(
connection: Connection,
source: PublicKey,
mint: PublicKey,
Expand Down Expand Up @@ -288,7 +288,7 @@ export async function createTransferCheckedWithTransferHookInstruction(
*
* @return Instruction to add to a transaction
*/
export async function createTransferCheckedWithFeeAndTransferHookInstruction(
export async function createTransferCheckedWithFeeInstructionWithExtraMetas(
connection: Connection,
source: PublicKey,
mint: PublicKey,
Expand Down
5 changes: 2 additions & 3 deletions token/js/test/unit/transferHook.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
createTransferCheckedInstruction,
createTransferCheckedWithTransferHookInstruction,
createTransferCheckedInstructionWithExtraMetas,
getExtraAccountMetaAddress,
getExtraAccountMetaList,
resolveExtraAccountMeta,
Expand Down Expand Up @@ -348,7 +347,7 @@ describe('transferHook', () => {
const connection = await getConnection();
connection.getAccountInfo = mockFetchAccountDataFn;

const transferInstruction = await createTransferCheckedWithTransferHookInstruction(
const transferInstruction = await createTransferCheckedInstructionWithExtraMetas(
connection,
sourcePubkey,
mintPubkey,
Expand Down

0 comments on commit 79a5fa7

Please sign in to comment.