@curvefi/api 2.71.4 → 2.71.5

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.
package/lib/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export declare const createCurve: () => {
29
29
  }) => void;
30
30
  setGasStrategy: (strategy: import("./interfaces.js").IGasStrategy) => void;
31
31
  getPoolList: () => string[];
32
+ getPoolsData: () => import("./interfaces.js").IDict<import("./interfaces.js").IPoolData>;
32
33
  getMainPoolList: () => string[];
33
34
  getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
34
35
  getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
@@ -366,6 +367,7 @@ declare const _default: {
366
367
  }) => void;
367
368
  setGasStrategy: (strategy: import("./interfaces.js").IGasStrategy) => void;
368
369
  getPoolList: () => string[];
370
+ getPoolsData: () => import("./interfaces.js").IDict<import("./interfaces.js").IPoolData>;
369
371
  getMainPoolList: () => string[];
370
372
  getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
371
373
  getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
package/lib/index.js CHANGED
@@ -34,6 +34,7 @@ export const createCurve = () => {
34
34
  setCustomFeeData: _curve.setCustomFeeData.bind(_curve),
35
35
  setGasStrategy: _curve.setGasStrategy.bind(_curve),
36
36
  getPoolList: _curve.getPoolList.bind(_curve),
37
+ getPoolsData: _curve.getPoolsData.bind(_curve),
37
38
  getMainPoolList: _curve.getMainPoolList.bind(_curve),
38
39
  getUserPoolListByLiquidity: getUserPoolListByLiquidity.bind(_curve),
39
40
  getUserPoolListByClaimable: getUserPoolListByClaimable.bind(_curve),
@@ -1040,7 +1040,7 @@ export class PoolTemplate extends CorePool {
1040
1040
  if (!address)
1041
1041
  throw Error("Need to connect wallet or pass address into args");
1042
1042
  const gaugeContract = this.curve.contracts[this.gauge.address].contract;
1043
- const rewardTokens = yield this.rewardTokens();
1043
+ const rewardTokens = yield this.rewardTokens(false);
1044
1044
  const rewards = [];
1045
1045
  if ('claimable_reward(address,address)' in gaugeContract) {
1046
1046
  for (const rewardToken of rewardTokens) {
package/lib/prices-api.js CHANGED
@@ -45,12 +45,12 @@ const _getGaugesOverview = memoize(() => __awaiter(void 0, void 0, void 0, funct
45
45
  maxAge: 5 * 60 * 1000,
46
46
  });
47
47
  const getGaugeAddressByPoolAddress = (network) => __awaiter(void 0, void 0, void 0, function* () {
48
- var _a;
48
+ var _a, _b;
49
49
  const { gauges } = yield _getGaugesOverview();
50
50
  const map = new Map();
51
51
  for (const gauge of gauges !== null && gauges !== void 0 ? gauges : []) {
52
52
  if (((_a = gauge.pool) === null || _a === void 0 ? void 0 : _a.chain) === network)
53
- map.set(gauge.pool.address.toLowerCase(), gauge.address.toLowerCase());
53
+ map.set(gauge.pool.address.toLowerCase(), ((_b = gauge.effective_address) !== null && _b !== void 0 ? _b : gauge.address).toLowerCase());
54
54
  }
55
55
  return map;
56
56
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.71.4",
3
+ "version": "2.71.5",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",