@cryptorubic/web3 0.5.1-alpha-fraxtal.1 → 0.5.1-alpha.ton-debug.2

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.5.1-alpha-fraxtal.1",
3
+ "version": "0.5.1-alpha.ton-debug.2",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0",
6
6
  "bignumber.js": "9.1.2",
7
- "@cryptorubic/core": "0.5.1-alpha-fraxtal.1",
7
+ "@cryptorubic/core": "0.5.1-alpha.ton-debug.2",
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.5.1-alpha-fraxtal.1",
14
+ "@cryptorubic/tron-types": "0.5.1-alpha.ton-debug.2",
15
15
  "bitcoin-address-validation": "^2.2.3",
16
16
  "axios": "0.27.2",
17
17
  "crc-32": "^1.2.2",
@@ -127,16 +127,21 @@ class TonApiService {
127
127
  return res.decoded;
128
128
  }
129
129
  async fetchTokenInfo(tokenAddress) {
130
- const res = await this.httpClient.get(`${this.tonApiUrl}/v2/jettons/${tokenAddress}`, {
131
- headers: {
132
- apiKey: this.apiKey,
133
- referer: 'https://api.rubic.exchange'
130
+ try {
131
+ const res = await this.httpClient.get(`${this.tonApiUrl}/v2/jettons/${tokenAddress}`, {
132
+ headers: {
133
+ apiKey: this.apiKey,
134
+ referer: 'https://api.rubic.exchange'
135
+ }
136
+ });
137
+ if ('error' in res) {
138
+ throw new Error(`[TonApiService] Error in fetchTokenInfo - ${res.error}`);
134
139
  }
135
- });
136
- if ('error' in res) {
137
- throw new Error(`[TonApiService] Error in fetchTokenInfo - ${res.error}`);
140
+ return res.metadata;
141
+ }
142
+ catch (err) {
143
+ throw new Error(`[TonApiService] Error in fetchTokenInfo - ${err}`);
138
144
  }
139
- return res.metadata;
140
145
  }
141
146
  /**
142
147
  *
@@ -70,6 +70,5 @@ exports.viemBlockchainMapping = {
70
70
  [core_1.BLOCKCHAIN_NAME.BAHAMUT]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.BAHAMUT],
71
71
  [core_1.BLOCKCHAIN_NAME.BITLAYER]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.BITLAYER],
72
72
  [core_1.BLOCKCHAIN_NAME.SEI]: chains_1.sei,
73
- [core_1.BLOCKCHAIN_NAME.GRAVITY]: chains_1.gravity,
74
- [core_1.BLOCKCHAIN_NAME.FRAXTAL]: chains_1.fraxtal
73
+ [core_1.BLOCKCHAIN_NAME.GRAVITY]: chains_1.gravity
75
74
  };