@curvefi/api 2.68.36 → 2.68.38

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.
@@ -114,12 +114,9 @@ export class StatsPool {
114
114
  poolType = poolType.replace(/-v2$/, '');
115
115
  }
116
116
  const poolsData = (yield _getPoolsFromApi.call(curve, network, poolType, curve.isLiteChain)).poolData;
117
- try {
118
- const totalLiquidity = poolsData.filter((data) => data.address.toLowerCase() === this.pool.address.toLowerCase())[0].usdTotal;
119
- return String(totalLiquidity);
120
- }
121
- catch (err) {
122
- console.log(this.pool.id, err.message);
117
+ const poolEntry = poolsData.find((data) => data.address.toLowerCase() === this.pool.address.toLowerCase());
118
+ if (poolEntry) {
119
+ return String(poolEntry.usdTotal);
123
120
  }
124
121
  }
125
122
  const balances = yield this.underlyingBalances();
@@ -4,17 +4,6 @@ export function routeGraphWorker() {
4
4
  const EXCLUDED_POOLS_FROM_ROUTER = {
5
5
  1: ['usdt'], // Ethereum mainnet
6
6
  };
7
- const SNX = {
8
- 10: {
9
- swap: "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4".toLowerCase(),
10
- coins: [
11
- "0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9", // sUSD
12
- "0xFBc4198702E81aE77c06D58f81b629BDf36f0a71", // sEUR
13
- "0xe405de8f52ba7559f9df3c368500b6e6ae6cee49", // sETH
14
- "0x298b9b95708152ff6968aafd889c6586e9169f1d", // sBTC
15
- ].map((a) => a.toLowerCase()),
16
- },
17
- };
18
7
  const createRouteGraph = ({ constants, chainId, isLiteChain, allPools, amplificationCoefficientDict, poolTvlDict }) => {
19
8
  var _a, _b, _c, _d;
20
9
  const routerGraph = {};
@@ -240,31 +229,6 @@ export function routeGraphWorker() {
240
229
  tvl: Infinity,
241
230
  }];
242
231
  }
243
- // SNX swaps
244
- if (chainId in SNX) {
245
- const chain = chainId;
246
- for (const inCoin of SNX[chain].coins) {
247
- for (const outCoin of SNX[chain].coins) {
248
- if (inCoin === outCoin)
249
- continue;
250
- if (!routerGraph[inCoin])
251
- routerGraph[inCoin] = {};
252
- routerGraph[inCoin][outCoin] = [{
253
- poolId: "SNX exchanger",
254
- swapAddress: SNX[chain].swap,
255
- inputCoinAddress: inCoin,
256
- outputCoinAddress: outCoin,
257
- swapParams: [0, 0, 9, 0, 0],
258
- poolAddress: constants.ZERO_ADDRESS,
259
- basePool: constants.ZERO_ADDRESS,
260
- baseToken: constants.ZERO_ADDRESS,
261
- secondBasePool: constants.ZERO_ADDRESS,
262
- secondBaseToken: constants.ZERO_ADDRESS,
263
- tvl: Infinity,
264
- }];
265
- }
266
- }
267
- }
268
232
  const start = Date.now();
269
233
  for (const poolItem of allPools) {
270
234
  const poolId = poolItem[0], poolData = poolItem[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.68.36",
3
+ "version": "2.68.38",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",
@@ -25,26 +25,26 @@
25
25
  },
26
26
  "type": "module",
27
27
  "devDependencies": {
28
- "@babel/eslint-parser": "^7.28.5",
29
- "@eslint/eslintrc": "^3.3.1",
30
- "@eslint/js": "^9.38.0",
28
+ "@babel/eslint-parser": "^7.28.6",
29
+ "@eslint/eslintrc": "^3.3.4",
30
+ "@eslint/js": "^9.39.3",
31
31
  "@types/chai": "^5.2.3",
32
32
  "@types/memoizee": "^0.4.12",
33
33
  "@types/mocha": "^10.0.10",
34
- "@types/node": "^24.9.2",
35
- "@typescript-eslint/eslint-plugin": "^8.46.2",
36
- "@typescript-eslint/parser": "^8.46.2",
37
- "chai": "^5.3.3",
38
- "eslint": "^9.38.0",
39
- "globals": "^16.4.0",
40
- "mocha": "^11.7.4",
34
+ "@types/node": "^25.3.0",
35
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
36
+ "@typescript-eslint/parser": "^8.56.1",
37
+ "chai": "^6.2.2",
38
+ "eslint": "^9.39.3",
39
+ "globals": "^17.3.0",
40
+ "mocha": "^11.7.5",
41
41
  "typescript": "^5.9.3",
42
- "vue-eslint-parser": "^10.2.0"
42
+ "vue-eslint-parser": "^10.4.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "@curvefi/ethcall": "^6.0.16",
46
- "bignumber.js": "^9.3.1",
47
- "ethers": "^6.15.0",
46
+ "bignumber.js": "^10.0.2",
47
+ "ethers": "^6.16.0",
48
48
  "memoizee": "^0.4.17"
49
49
  }
50
50
  }