@curvefi/api 2.65.24 → 2.65.25
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 +4 -4
- package/package.json +1 -1
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
|
});
|