mirror of
https://github.com/status-im/community-dapp.git
synced 2025-02-24 03:58:29 +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) {
|
export function getVotingWinner(vote: CurrentVoting) {
|
||||||
if (vote?.timeLeft <= 0) {
|
if (vote?.timeLeft <= 0) {
|
||||||
return vote.voteAgainst < vote.voteFor ? 2 : 1
|
return vote.voteFor.gt(vote.voteAgainst) ? 2 : 1
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user