Skip to content

Commit

Permalink
Loading data from file in vote.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
xcthulhu authored and marijanp committed May 25, 2024
1 parent 64b13bb commit a861902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethereum/scripts/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const main = async (): Promise<void> => {
fs.readFileSync(`${__dirname}/../CONTRACT_ADDRESS`, 'utf8')
) as VoteRecorder;
const electionId = process.env["ELECTION_ID"] as string;
const voteData = process.env["VOTE_DATA"] as string;
const voteData = fs.readFileSync(process.env["VOTE_DATA_FILE"] as string, 'utf8');
await voteRecorder.vote(electionId, voteData);
console.log(`${(await voteRecorder.getVotesTallied(electionId)).toString()} vote(s) cast`)
}
Expand Down

0 comments on commit a861902

Please sign in to comment.