impermax-sdk 1.0.39 → 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.
@@ -90,7 +90,7 @@ exports.AMM_FACTORY = {
90
90
  [Amms.solidlyOxd]: '0xB83D21F60B73B21506c69DEcdBcF7Ab5AB737eB2', //NOTICE: this is actually the staked LP factory
91
91
  },
92
92
  [types_1.Networks.Canto]: {
93
- [Amms.velocimeter]: '0x1D20635535307208919f0b67c3B2065965A85aA9',
93
+ [Amms.velocimeter]: '0xF80909DF0A01ff18e4D37BF682E40519B21Def46',
94
94
  },
95
95
  [types_1.Networks.Harmony]: {},
96
96
  [types_1.Networks.Moonbeam]: {},
@@ -424,7 +424,8 @@ function initializeTvlData() {
424
424
  types_1.Networks.Polygon,
425
425
  types_1.Networks.Avalanche,
426
426
  types_1.Networks.Moonriver,
427
- types_1.Networks.Fantom
427
+ types_1.Networks.Fantom,
428
+ //Networks.Canto, let's wait for it to be stable before including
428
429
  ]; // exclude ropsten
429
430
  const calls = [];
430
431
  for (const network of networks) {
@@ -453,6 +454,22 @@ function initializeTvlData() {
453
454
  }
454
455
  crossChainTVLUSD += chainTvlUSD;
455
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
+ }
456
473
  return {
457
474
  crossChainTVLUSD,
458
475
  totalBalanceUSD: thisChainTVLUSD,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",