@curvefi/api 2.66.9 → 2.66.11

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.
@@ -1,5 +1,5 @@
1
1
  export const volumeNetworks = {
2
- getVolumes: [1, 10, 100, 137, 250, 252, 8453, 42161],
2
+ getVolumes: [1, 10, 100, 137, 250, 252, 8453, 42161, 146],
3
3
  getSubgraphData: [43114],
4
4
  getFactoryAPYs: [56, 196, 324, 1284, 2222, 5000, 42220, 1313161554],
5
5
  };
@@ -127,7 +127,7 @@ export class StatsPool {
127
127
  return totalLiquidity.toFixed(8);
128
128
  });
129
129
  this.volume = () => __awaiter(this, void 0, void 0, function* () {
130
- if (curve.isLiteChain) {
130
+ if (curve.isLiteChain && curve.chainId !== 146) {
131
131
  throw Error('This method is not supported for the lite version');
132
132
  }
133
133
  const network = curve.constants.NETWORK_NAME;
@@ -139,7 +139,7 @@ export class StatsPool {
139
139
  throw Error(`Can't get Volume for ${this.pool.name} (id: ${this.pool.id})`);
140
140
  });
141
141
  this.baseApy = () => __awaiter(this, void 0, void 0, function* () {
142
- if (curve.isLiteChain) {
142
+ if (curve.isLiteChain && curve.chainId !== 146) {
143
143
  throw Error('baseApy is not supported for the lite version');
144
144
  }
145
145
  const network = curve.constants.NETWORK_NAME;
package/lib/utils.js CHANGED
@@ -590,7 +590,7 @@ export const getTVL = (...args_1) => __awaiter(void 0, [...args_1], void 0, func
590
590
  return allTypesExtendedPoolData.reduce((sum, data) => { var _a, _b; return sum + ((_b = (_a = data.tvl) !== null && _a !== void 0 ? _a : data.tvlAll) !== null && _b !== void 0 ? _b : 0); }, 0);
591
591
  });
592
592
  export const getVolumeApiController = (network) => __awaiter(void 0, void 0, void 0, function* () {
593
- if (curve.isLiteChain) {
593
+ if (curve.isLiteChain && curve.chainId !== 146) {
594
594
  throw Error('This method is not supported for the lite version');
595
595
  }
596
596
  if (volumeNetworks.getVolumes.includes(curve.chainId)) {
@@ -605,7 +605,7 @@ export const getVolumeApiController = (network) => __awaiter(void 0, void 0, voi
605
605
  throw Error(`Can't get volume for network: ${network}`);
606
606
  });
607
607
  export const getVolume = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (chainId = curve.chainId) {
608
- if (curve.isLiteChain) {
608
+ if (curve.isLiteChain && curve.chainId !== 146) {
609
609
  throw Error('This method is not supported for the lite version');
610
610
  }
611
611
  const networkConstants = yield getNetworkConstants(chainId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.66.9",
3
+ "version": "2.66.11",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",