Skip to content

Commit

Permalink
Merge pull request #38 from oasisprotocol/csillag/fix-voting-visual-g…
Browse files Browse the repository at this point in the history
…litch

Forbid changing the selection while voting
  • Loading branch information
csillag authored Sep 23, 2024
2 parents 6e1a220 + b9908cb commit 4953abc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/pages/PollPage/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export const usePollData = (pollId: string) => {
canSelect =
!remainingTime?.isPastDue &&
winningChoice === undefined &&
(eth.state.address === undefined || existingVote === undefined)
(eth.state.address === undefined || existingVote === undefined) &&
!isVoting

canVote =
(!!eth.state.address || isDemo) &&
Expand All @@ -100,7 +101,8 @@ export const usePollData = (pollId: string) => {
!isCompleting &&
winningChoice === undefined &&
existingVote === undefined &&
getVerdict(permissions.canVote, false)
getVerdict(permissions.canVote, false) &&
!isVoting
}

const hasWallet = isDemo || (isHomeChain && userAddress !== ZeroAddress)
Expand Down

0 comments on commit 4953abc

Please sign in to comment.