Skip to content

Commit 58d9cae

Browse files
committed
updated return value
1 parent 910f814 commit 58d9cae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contracts/Voting.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ contract Voting {
127127
end_times[i] = polls[i].end_time;
128128
fees[i] = polls[i].fee;
129129
poll_ids[i] = i;
130-
voted_idxs[i] = polls[i].votes[msg.sender]-1;
130+
voted_idxs[i] = polls[i].votes[msg.sender];
131131

132132
// get option_count from poll
133133
uint option_count = polls[i].option_count;

hooks/useVoting.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const useVoting = async () => {
1414
const signer = provider.getSigner();
1515

1616
const contract = new ethers.Contract(
17-
"0x85bD1fAaf97566ffa78481A050321B6d9B10e984",
17+
"0xfFD1a7105Fae1774971654EE8DcccC30Bb4846Cf",
1818
Voting.abi,
1919
signer
2020
);

0 commit comments

Comments
 (0)