@curvefi/api 2.65.24 → 2.65.26

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/dao.js CHANGED
@@ -310,7 +310,7 @@ export const userProposalVotes = (address = "") => __awaiter(void 0, void 0, voi
310
310
  const proposalList = yield _getDaoProposalList();
311
311
  const calls = [];
312
312
  for (const proposal of proposalList) {
313
- if (proposal.voteType == "PARAMETER") {
313
+ if (proposal.voteType.toUpperCase() == "PARAMETER") {
314
314
  calls.push(curve.contracts[curve.constants.ALIASES.voting_parameter].multicallContract.getVoterState(proposal.voteId, address));
315
315
  }
316
316
  else {
@@ -333,7 +333,7 @@ export const userProposalVotes = (address = "") => __awaiter(void 0, void 0, voi
333
333
  const _voteForProposal = (type, id, support, estimateGas) => __awaiter(void 0, void 0, void 0, function* () {
334
334
  if (curve.chainId !== 1)
335
335
  throw Error("Ethereum-only method");
336
- const contractAddress = type === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
336
+ const contractAddress = type.toUpperCase() === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
337
337
  const contract = curve.contracts[contractAddress].contract;
338
338
  const yesPct = support ? BigInt(Math.pow(10, 18)) : BigInt(0);
339
339
  const noPct = BigInt(Math.pow(10, 18)) - yesPct;
@@ -353,7 +353,7 @@ export const voteForProposal = (type, id, support) => __awaiter(void 0, void 0,
353
353
  const _executeVote = (type, id, estimateGas = false) => __awaiter(void 0, void 0, void 0, function* () {
354
354
  if (curve.chainId !== 1)
355
355
  throw Error("Ethereum-only method");
356
- const contractAddress = type === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
356
+ const contractAddress = type.toUpperCase() === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
357
357
  const contract = curve.contracts[contractAddress].contract;
358
358
  const gas = yield contract.executeVote.estimateGas(id, curve.constantOptions);
359
359
  if (estimateGas)
@@ -371,7 +371,7 @@ export const executeVote = (type, id) => __awaiter(void 0, void 0, void 0, funct
371
371
  export const isCanVoteExecute = (type, id) => __awaiter(void 0, void 0, void 0, function* () {
372
372
  if (curve.chainId !== 1)
373
373
  throw Error("Ethereum-only method");
374
- const contractAddress = type === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
374
+ const contractAddress = type.toUpperCase() === "PARAMETER" ? curve.constants.ALIASES.voting_parameter : curve.constants.ALIASES.voting_ownership;
375
375
  const contract = curve.contracts[contractAddress].contract;
376
376
  return yield contract.canExecute(id, Object.assign({}, curve.options));
377
377
  });
@@ -211,7 +211,7 @@ export const _getLiteNetworksData = memoize((networkName) => __awaiter(void 0, v
211
211
  router: contracts.helpers.router.address.toLowerCase(),
212
212
  deposit_and_stake: contracts.helpers.deposit_and_stake_zap.address.toLowerCase(),
213
213
  stable_ng_meta_zap: contracts.helpers.stable_swap_meta_zap.address.toLowerCase(),
214
- crv: config.dao.crv.toLowerCase(),
214
+ crv: config.dao.crv ? config.dao.crv.toLowerCase() : '0x0000000000000000000000000000000000000000',
215
215
  },
216
216
  NATIVE_COIN: {
217
217
  symbol: native_currency_symbol,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.65.24",
3
+ "version": "2.65.26",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",