From c3a23911c7bc8d3a8ff2125f1a341ba451c5f4b2 Mon Sep 17 00:00:00 2001 From: 00xSam Date: Thu, 9 Jan 2025 20:58:44 +0800 Subject: [PATCH] fix: ata multiple position error --- CHANGELOG.md | 6 ++++++ ts-client/package.json | 2 +- ts-client/src/dlmm/helpers/index.ts | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aa14c96..286ff4bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security +## @meteora-ag/dlmm [1.3.8] - PR #144 + +### Fixed + +- Fix `getOrCreateATAInstruction` to use `createAssociatedTokenAccountIdempotentInstruction` + ## @meteora-ag/dlmm [1.3.7] - PR #143 ### Fixed diff --git a/ts-client/package.json b/ts-client/package.json index 8f76340c..f881b84d 100644 --- a/ts-client/package.json +++ b/ts-client/package.json @@ -1,6 +1,6 @@ { "name": "@meteora-ag/dlmm", - "version": "1.3.7", + "version": "1.3.8", "description": "", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/ts-client/src/dlmm/helpers/index.ts b/ts-client/src/dlmm/helpers/index.ts index 542a6bab..bb674bb6 100644 --- a/ts-client/src/dlmm/helpers/index.ts +++ b/ts-client/src/dlmm/helpers/index.ts @@ -4,6 +4,7 @@ import { TOKEN_PROGRAM_ID, TokenAccountNotFoundError, TokenInvalidAccountOwnerError, + createAssociatedTokenAccountIdempotentInstruction, createAssociatedTokenAccountInstruction, createCloseAccountInstruction, getAccount, @@ -111,7 +112,7 @@ export const getOrCreateATAInstruction = async ( e instanceof TokenAccountNotFoundError || e instanceof TokenInvalidAccountOwnerError ) { - const ix = createAssociatedTokenAccountInstruction( + const ix = createAssociatedTokenAccountIdempotentInstruction( payer, toAccount, owner,