mirror of
https://github.com/status-im/community-dapp.git
synced 2025-02-23 19:48:27 +00:00
Fix vote winner (#182)
This commit is contained in:
parent
ebee7f5571
commit
1eedf53352
@ -3,7 +3,7 @@ import { VotingRoom } from '../models/smartContract'
|
||||
|
||||
export function getVotingWinner(vote: CurrentVoting) {
|
||||
if (vote?.timeLeft <= 0) {
|
||||
return vote.voteAgainst < vote.voteFor ? 2 : 1
|
||||
return vote.voteFor.gt(vote.voteAgainst) ? 2 : 1
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user