diff --git a/packages/js-client/src/internal/interfaces.ts b/packages/js-client/src/internal/interfaces.ts index 23c00373..5bffa1eb 100644 --- a/packages/js-client/src/internal/interfaces.ts +++ b/packages/js-client/src/internal/interfaces.ts @@ -79,7 +79,7 @@ export interface IGaslessVotingClientMethods { proposalId: string, tryExecutio: boolean ): AsyncGenerator; - execute( + executeProposal( proposalId: string ): AsyncGenerator; pinMetadata(params: ProposalMetadata): Promise; @@ -97,7 +97,7 @@ export interface IGaslessVotingClientEstimation { results: bigint[][] ): Promise; approve(proposalId: string): Promise; - execute(proposalId: string): Promise; + executeProposal(proposalId: string): Promise; // Add any estimation methods that you need } export interface IGaslessVotingClientEncoding { diff --git a/packages/js-client/src/internal/modules/estimation.ts b/packages/js-client/src/internal/modules/estimation.ts index 9ea80b21..7f53ab2c 100644 --- a/packages/js-client/src/internal/modules/estimation.ts +++ b/packages/js-client/src/internal/modules/estimation.ts @@ -89,7 +89,6 @@ export class GaslessVotingClientEstimation signer ); - const estimatedGasFee = await gaslessVotingContract.estimateGas.setTally( id, results @@ -116,7 +115,7 @@ export class GaslessVotingClientEstimation ); const proposalFromSC = toGaslessVotingProposal( - await gaslessVotingContract.getProposal(proposalId) + await gaslessVotingContract.getProposal(id) ); const vochainProposal = await this.vocdoniSDK.fetchElection( proposalFromSC.vochainProposalId @@ -145,7 +144,7 @@ export class GaslessVotingClientEstimation * @return {*} {Promise} * @memberof GaslessVotingClientEstimation */ - public async execute( + public async executeProposal( proposalId: string ): Promise { const signer = this.web3.getConnectedSigner(); diff --git a/packages/js-client/src/internal/modules/methods.ts b/packages/js-client/src/internal/modules/methods.ts index 8eb5ef44..3ae54178 100644 --- a/packages/js-client/src/internal/modules/methods.ts +++ b/packages/js-client/src/internal/modules/methods.ts @@ -510,7 +510,7 @@ export class GaslessVotingClientMethods ); const proposalFromSC = toGaslessVotingProposal( - await gaslessVotingContract.getProposal(proposalId) + await gaslessVotingContract.getProposal(id) ); const vochainProposal = await this.vocdoniSDK.fetchElection( proposalFromSC.vochainProposalId @@ -519,7 +519,7 @@ export class GaslessVotingClientMethods if (proposalFromSC.approvers.length == 0) { return this.setTally( - encodeProposalId(pluginAddress,id), + proposalId, vochainResultsToSCResults(vochainProposal) ); } @@ -552,7 +552,7 @@ export class GaslessVotingClientMethods signer ); - let tx = await gaslessVotingContract.setTally(proposalId, results); + let tx = await gaslessVotingContract.setTally(id, results); yield { key: ApproveTallyStep.EXECUTING, @@ -614,7 +614,7 @@ export class GaslessVotingClientMethods * @return {*} {AsyncGenerator} * @memberof GaslessVotingClientMethods */ - public async *execute( + public async *executeProposal( proposalId: string ): AsyncGenerator { const { pluginAddress, id } = decodeProposalId(proposalId);