Fix cast votes (#192)

This commit is contained in:
Szymon Szlachtowicz 2021-09-03 09:14:46 +02:00 committed by GitHub
parent 8082921651
commit c5e897214b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -212,6 +212,7 @@ contract VotingContract {
require(roomId < votingRooms.length, 'vote not found');
VotingRoom storage room = votingRooms[roomId];
require(room.endAt > block.timestamp, 'vote closed');
require(!room.finalized, 'room finalized');
if (voted[roomId][vote.voter] == false) {
if (token.balanceOf(vote.voter) >= vote.sntAmount) {
if (vote.roomIdAndType & 1 == 1) {