Skip to content

Commit

Permalink
Updates setTally
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Oct 3, 2023
1 parent 3658d68 commit f74685a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/js-client/src/internal/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export interface IOffchainVotingClientMethods {
pluginAddress: string,
memberAddress: string
): Promise<boolean>;
setTally(proposalId: string): AsyncGenerator<SetTallyStepValue>;
setTally(
pluginAddress: string,
proposalId: string
): AsyncGenerator<SetTallyStepValue>;
approveTally(
proposalId: string,
tryExecution: boolean
Expand Down
5 changes: 3 additions & 2 deletions packages/js-client/src/internal/modules/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,12 @@ export class OffchainVotingClientMethods
* @memberof OffchainVotingClientMethods
*/
public async *setTally(
pluginAddress: string,
proposalId: string
): AsyncGenerator<SetTallyStepValue> {
const signer = this.web3.getConnectedSigner();

const { pluginAddress, id } = decodeProposalId(proposalId);
// const { pluginAddress, id } = decodeProposalId(proposalId);

const gaslessVotingContract = VocdoniVoting__factory.connect(
pluginAddress,
Expand All @@ -448,7 +449,7 @@ export class OffchainVotingClientMethods
proposalFromSC.vochainProposalId
);
const tx = await gaslessVotingContract.setTally(
id,
proposalId,
vochainProposal.results
);

Expand Down

0 comments on commit f74685a

Please sign in to comment.