impermax-sdk 1.2.106 → 1.2.107

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.
@@ -464,11 +464,11 @@ function initializeTvlData() {
464
464
  types_1.Networks.Arbitrum,
465
465
  types_1.Networks.Polygon,
466
466
  types_1.Networks.Avalanche,
467
- types_1.Networks.Moonriver,
467
+ // Networks.Moonriver,
468
468
  types_1.Networks.Fantom,
469
- types_1.Networks.Canto,
469
+ // Networks.Canto,
470
470
  types_1.Networks.ZksyncEra,
471
- types_1.Networks.Mantle,
471
+ // Networks.Mantle,
472
472
  types_1.Networks.Base,
473
473
  types_1.Networks.Scroll,
474
474
  types_1.Networks.Real,
@@ -479,7 +479,7 @@ function initializeTvlData() {
479
479
  for (const factory in subgraphs_1.IMPERMAX_SUBGRAPH_URL[network]) {
480
480
  // Multiple endpoints
481
481
  const subgraphs = subgraphs_1.IMPERMAX_SUBGRAPH_URL[network][factory];
482
- calls.push(this.endpointManager.fetch(subgraphs, this.network, (queryBuilder) => queryBuilder.tvlQuery()));
482
+ calls.push(this.endpointManager.fetch(subgraphs, network, (queryBuilder) => queryBuilder.tvlQuery()));
483
483
  }
484
484
  }
485
485
  let results;
@@ -78,7 +78,7 @@ const dexscreener_ids = {
78
78
  // ibex on zksync
79
79
  "0xbe9f8c0d6f0fd7e46cdacca340747ea2f247991d": "zksync",
80
80
  // preon on scroll
81
- "0x135f9b3d5dec9d73c042cf380adfff95f4fe9e35": "scroll",
81
+ "0x135f9b3d5dec9d73c042cf380adfff95f4fe9e35": "scroll,blast",
82
82
  // wstRWA on scroll
83
83
  "0x154f5db4950d2cd4a7af425e11865215f90ddb07": "scroll",
84
84
  // axlOP on base
@@ -87,8 +87,6 @@ const dexscreener_ids = {
87
87
  "0xc38464250f51123078bbd7ea574e185f6623d037": "optimism",
88
88
  // fantom-bomb on scroll (removed from coingecko)
89
89
  "0x6b6882f7642ee1c15f12b51f1a4988b3e7e29f5c": "scroll",
90
- // ibex on blast
91
- "0x9f04b6cefd5bcd67d76ab708f17553ce40188e6a": "blast"
92
90
  };
93
91
  const fantom_ids = {
94
92
  // uponly on ftm
@@ -225,7 +223,7 @@ class OffchainPriceHelper {
225
223
  if (!data || !data.pairs || data.pairs.length === 0)
226
224
  return 0;
227
225
  const pairs = data.pairs;
228
- const pairItem = pairs.filter((pair) => pair.chainId == chainId && (pair.baseToken.address.toLowerCase() == tokenAddress || pair.quoteToken.address.toLowerCase() == tokenAddress));
226
+ const pairItem = pairs.filter((pair) => pair.chainId.includes(chainId) && (pair.baseToken.address.toLowerCase() == tokenAddress || pair.quoteToken.address.toLowerCase() == tokenAddress));
229
227
  return pairItem.length > 0 ? pairItem[0].priceUsd : 0;
230
228
  }
231
229
  catch (_a) {
@@ -11,12 +11,10 @@ class QueryBuilderFactory {
11
11
  * Gets an API's query builder given an endpoint
12
12
  */
13
13
  static getQuery(endpoint) {
14
- if (endpoint.includes("thegraph"))
15
- return new thegraph_1.TheGraphQueryBuilder();
16
- if (endpoint.includes("goldsky"))
17
- return new thegraph_1.TheGraphQueryBuilder(); // Same as thegraph
18
- // Default to ponder (ie. includes('railway')) but helps local test
19
- return new ponder_1.PonderQueryBuilder();
14
+ // Use ponder for railway and thegraph builder for everything else
15
+ if (endpoint.includes("up.railway.app"))
16
+ return new ponder_1.PonderQueryBuilder();
17
+ return new thegraph_1.TheGraphQueryBuilder();
20
18
  }
21
19
  /**
22
20
  * Helper to transform nested query results from various apis during apollo fetch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.2.106",
3
+ "version": "1.2.107",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",