@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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/index.cjs +1 -1
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.js +2 -2
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -3
package/dist/esm/solana/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAssociatedTokenAddress, NATIVE_MINT,
|
|
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 ? [] : [
|
|
232
|
+
const instructions = (accInfo.value?.lamports ?? 0) > 0 ? [] : [createAssociatedTokenAccountIdempotentInstruction(senderAddress, tokenAccount, senderAddress, NATIVE_MINT)];
|
|
233
233
|
return [
|
|
234
234
|
...instructions,
|
|
235
235
|
SystemProgram.transfer({
|