@talismn/balances 0.0.0-pr2091-20250729074348 → 0.0.0-pr2091-20250729075611
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.
@@ -1966,7 +1966,7 @@ const getTransferCallData$6 = async ({
|
|
1966
1966
|
const toTokenAccount = await splToken.getAssociatedTokenAddress(mint, toWallet);
|
1967
1967
|
|
1968
1968
|
// Create the target token account if it doesn't exist
|
1969
|
-
if (!(await
|
1969
|
+
if (!(await tokenAccountExists(connection, toTokenAccount))) {
|
1970
1970
|
instructions.push(splToken.createAssociatedTokenAccountInstruction(fromWallet,
|
1971
1971
|
// funder
|
1972
1972
|
toTokenAccount, toWallet, mint));
|
@@ -1976,7 +1976,7 @@ const getTransferCallData$6 = async ({
|
|
1976
1976
|
instructions.push(splToken.createTransferInstruction(fromTokenAccount, toTokenAccount, fromWallet, BigInt(value), [], splToken.TOKEN_PROGRAM_ID));
|
1977
1977
|
return instructions;
|
1978
1978
|
};
|
1979
|
-
const
|
1979
|
+
const tokenAccountExists = async (connection, address) => {
|
1980
1980
|
try {
|
1981
1981
|
await splToken.getAccount(connection, address);
|
1982
1982
|
return true;
|
@@ -1966,7 +1966,7 @@ const getTransferCallData$6 = async ({
|
|
1966
1966
|
const toTokenAccount = await splToken.getAssociatedTokenAddress(mint, toWallet);
|
1967
1967
|
|
1968
1968
|
// Create the target token account if it doesn't exist
|
1969
|
-
if (!(await
|
1969
|
+
if (!(await tokenAccountExists(connection, toTokenAccount))) {
|
1970
1970
|
instructions.push(splToken.createAssociatedTokenAccountInstruction(fromWallet,
|
1971
1971
|
// funder
|
1972
1972
|
toTokenAccount, toWallet, mint));
|
@@ -1976,7 +1976,7 @@ const getTransferCallData$6 = async ({
|
|
1976
1976
|
instructions.push(splToken.createTransferInstruction(fromTokenAccount, toTokenAccount, fromWallet, BigInt(value), [], splToken.TOKEN_PROGRAM_ID));
|
1977
1977
|
return instructions;
|
1978
1978
|
};
|
1979
|
-
const
|
1979
|
+
const tokenAccountExists = async (connection, address) => {
|
1980
1980
|
try {
|
1981
1981
|
await splToken.getAccount(connection, address);
|
1982
1982
|
return true;
|
@@ -1957,7 +1957,7 @@ const getTransferCallData$6 = async ({
|
|
1957
1957
|
const toTokenAccount = await getAssociatedTokenAddress(mint, toWallet);
|
1958
1958
|
|
1959
1959
|
// Create the target token account if it doesn't exist
|
1960
|
-
if (!(await
|
1960
|
+
if (!(await tokenAccountExists(connection, toTokenAccount))) {
|
1961
1961
|
instructions.push(createAssociatedTokenAccountInstruction(fromWallet,
|
1962
1962
|
// funder
|
1963
1963
|
toTokenAccount, toWallet, mint));
|
@@ -1967,7 +1967,7 @@ const getTransferCallData$6 = async ({
|
|
1967
1967
|
instructions.push(createTransferInstruction(fromTokenAccount, toTokenAccount, fromWallet, BigInt(value), [], TOKEN_PROGRAM_ID));
|
1968
1968
|
return instructions;
|
1969
1969
|
};
|
1970
|
-
const
|
1970
|
+
const tokenAccountExists = async (connection, address) => {
|
1971
1971
|
try {
|
1972
1972
|
await getAccount(connection, address);
|
1973
1973
|
return true;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.0.0-pr2091-
|
3
|
+
"version": "0.0.0-pr2091-20250729075611",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -38,14 +38,14 @@
|
|
38
38
|
"scale-ts": "^1.6.1",
|
39
39
|
"viem": "^2.27.3",
|
40
40
|
"zod": "^3.25.62",
|
41
|
-
"@talismn/chain-connectors": "0.0.0-pr2091-
|
42
|
-
"@talismn/
|
43
|
-
"@talismn/chaindata-provider": "0.0.0-pr2091-20250729074348",
|
44
|
-
"@talismn/sapi": "0.0.0-pr2091-20250729074348",
|
41
|
+
"@talismn/chain-connectors": "0.0.0-pr2091-20250729075611",
|
42
|
+
"@talismn/chaindata-provider": "0.0.0-pr2091-20250729075611",
|
45
43
|
"@talismn/scale": "0.2.0",
|
46
|
-
"@talismn/
|
47
|
-
"@talismn/
|
48
|
-
"@talismn/
|
44
|
+
"@talismn/sapi": "0.0.0-pr2091-20250729075611",
|
45
|
+
"@talismn/solana": "0.0.0-pr2091-20250729075611",
|
46
|
+
"@talismn/token-rates": "0.0.0-pr2091-20250729075611",
|
47
|
+
"@talismn/util": "0.0.0-pr2091-20250729075611",
|
48
|
+
"@talismn/crypto": "0.0.0-pr2091-20250729075611"
|
49
49
|
},
|
50
50
|
"devDependencies": {
|
51
51
|
"@polkadot/api-contract": "16.1.2",
|