@cryptorubic/web3 0.8.10-alpha-squid-solana.2 → 0.8.10-alpha-squid-solana.3
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/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptorubic/web3",
|
|
3
|
-
"version": "0.8.10-alpha-squid-solana.
|
|
3
|
+
"version": "0.8.10-alpha-squid-solana.3",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.0",
|
|
6
6
|
"bignumber.js": "9.1.2",
|
|
7
|
-
"@cryptorubic/core": "0.8.10-alpha-squid-solana.
|
|
7
|
+
"@cryptorubic/core": "0.8.10-alpha-squid-solana.3",
|
|
8
8
|
"viem": "^2.19.1",
|
|
9
9
|
"web3-utils": "^4.3.1",
|
|
10
10
|
"@ton/ton": "^15.1.0",
|
|
11
11
|
"@solana/web3.js": "1.95.3",
|
|
12
12
|
"@solflare-wallet/utl-sdk": "^1.4.0",
|
|
13
13
|
"@ethersproject/bignumber": "^5.7.0",
|
|
14
|
-
"@cryptorubic/tron-types": "0.8.10-alpha-squid-solana.
|
|
14
|
+
"@cryptorubic/tron-types": "0.8.10-alpha-squid-solana.3",
|
|
15
15
|
"bitcoin-address-validation": "^2.2.3",
|
|
16
16
|
"axios": "0.27.2",
|
|
17
17
|
"crc-32": "^1.2.2",
|
|
@@ -124,11 +124,9 @@ class SolanaAdapter extends abstract_adapter_1.AbstractAdapter {
|
|
|
124
124
|
async createTransferData(fromToken, walletAddress, receiver, convertToVersionedTx) {
|
|
125
125
|
const fromAddress = new web3_js_1.PublicKey(walletAddress);
|
|
126
126
|
const toAddress = new web3_js_1.PublicKey(receiver);
|
|
127
|
-
this.logger?.customLog('111111111111111', [fromAddress, toAddress]);
|
|
128
127
|
const transaction = fromToken.isNative
|
|
129
128
|
? this.createNativeTransfer(fromAddress, toAddress, fromToken.stringWeiAmount)
|
|
130
129
|
: await this.createTokenTransfer(fromAddress, toAddress, fromToken.address, fromToken.stringWeiAmount);
|
|
131
|
-
this.logger?.customLog('22222222222222222');
|
|
132
130
|
if (convertToVersionedTx) {
|
|
133
131
|
const blockhash = await this.getLatestBlockhash();
|
|
134
132
|
const message = new web3_js_1.TransactionMessage({
|
|
@@ -154,7 +152,7 @@ class SolanaAdapter extends abstract_adapter_1.AbstractAdapter {
|
|
|
154
152
|
(0, spl_token_1.getAssociatedTokenAddress)(mintTokenAccount, toAddress)
|
|
155
153
|
]);
|
|
156
154
|
const transaction = new web3_js_1.Transaction();
|
|
157
|
-
const receiverAccountInfo = this.public.getAccountInfo(toATA);
|
|
155
|
+
const receiverAccountInfo = await this.public.getAccountInfo(toATA);
|
|
158
156
|
if (!receiverAccountInfo) {
|
|
159
157
|
transaction.add((0, spl_token_1.createAssociatedTokenAccountInstruction)(fromAddress, toATA, toAddress, mintTokenAccount));
|
|
160
158
|
}
|