@streamflow/common 13.4.0 → 13.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { getAssociatedTokenAddress, NATIVE_MINT, createAssociatedTokenAccountInstruction, createSyncNativeInstruction, TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, unpackMint } from '@solana/spl-token';
1
+ import { getAssociatedTokenAddress, NATIVE_MINT, createAssociatedTokenAccountIdempotentInstruction, createSyncNativeInstruction, createAssociatedTokenAccountInstruction, TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, unpackMint } from '@solana/spl-token';
2
2
  import { SystemProgram, Keypair, TransactionMessage, VersionedTransaction, SendTransactionError, ComputeBudgetProgram, Transaction, PublicKey } from '@solana/web3.js';
3
3
  import bs58 from 'bs58';
4
4
  import { Program } from '@coral-xyz/anchor';
@@ -229,7 +229,7 @@ var getFilters = (criteria, byteOffsets) => {
229
229
  var prepareWrappedAccount = async (connection, senderAddress, amount) => {
230
230
  const tokenAccount = await getAssociatedTokenAddress(NATIVE_MINT, senderAddress, true);
231
231
  const accInfo = await connection.getParsedAccountInfo(tokenAccount);
232
- const instructions = (accInfo.value?.lamports ?? 0) > 0 ? [] : [createAssociatedTokenAccountInstruction(senderAddress, tokenAccount, senderAddress, NATIVE_MINT)];
232
+ const instructions = (accInfo.value?.lamports ?? 0) > 0 ? [] : [createAssociatedTokenAccountIdempotentInstruction(senderAddress, tokenAccount, senderAddress, NATIVE_MINT)];
233
233
  return [
234
234
  ...instructions,
235
235
  SystemProgram.transfer({