impermax-sdk 1.0.40 → 1.0.41

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.
@@ -454,6 +454,22 @@ function initializeTvlData() {
454
454
  }
455
455
  crossChainTVLUSD += chainTvlUSD;
456
456
  }
457
+ if (!networks.includes(this.network)) {
458
+ const calls = [];
459
+ for (const factory of Object.keys(subgraphs_1.IMPERMAX_SUBGRAPH_URL[this.network])) {
460
+ const subgraph = subgraphs_1.IMPERMAX_SUBGRAPH_URL[this.network][factory];
461
+ calls.push(this.apolloFetcher(subgraph, query.tvlQuery()));
462
+ }
463
+ const results = yield Promise.all(calls);
464
+ i = 0;
465
+ for (const factory of Object.keys(subgraphs_1.IMPERMAX_SUBGRAPH_URL[this.network])) {
466
+ const data = results[i].data.impermaxFactories[0];
467
+ thisChainTVLUSD += parseFloat(data.totalBalanceUSD);
468
+ thisChainSupplyUSD += parseFloat(data.totalSupplyUSD);
469
+ thisChainBorrowUSD += parseFloat(data.totalBorrowsUSD);
470
+ i++;
471
+ }
472
+ }
457
473
  return {
458
474
  crossChainTVLUSD,
459
475
  totalBalanceUSD: thisChainTVLUSD,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",