diff --git a/clients/rwa-token-sdk/src/asset-controller/instructions.ts b/clients/rwa-token-sdk/src/asset-controller/instructions.ts index 173863d..696d4b6 100644 --- a/clients/rwa-token-sdk/src/asset-controller/instructions.ts +++ b/clients/rwa-token-sdk/src/asset-controller/instructions.ts @@ -304,7 +304,7 @@ export async function getTransferTokensIxs( } } catch (error) { if (args.createTa) { - ixs.push(createAssociatedTokenAccountInstruction(new PublicKey(args.payer), getAssociatedTokenAddressSync( + ixs.push(createAssociatedTokenAccountInstruction(new PublicKey(args.from), getAssociatedTokenAddressSync( new PublicKey(args.assetMint), new PublicKey(args.to), true, diff --git a/clients/rwa-token-sdk/tests/e2e.test.ts b/clients/rwa-token-sdk/tests/e2e.test.ts index 35ed0c7..023640f 100644 --- a/clients/rwa-token-sdk/tests/e2e.test.ts +++ b/clients/rwa-token-sdk/tests/e2e.test.ts @@ -351,6 +351,7 @@ describe("e2e tests", async () => { assetMint: mint, amount: 2000, decimals, + createTa: true, }; const transferIxs = await rwaClient.assetController.transfer(transferArgs);