Skip to content

Commit

Permalink
case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl committed Nov 6, 2024
1 parent a83adca commit 5de54c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/gno.land/p/demo/simpledao/votestore.gno
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ func (t *tally) castVote(member membstore.Member, option dao.VoteOption) error {
return ErrAlreadyVoted
}

// convert option to upper-case, like the constants are.
option = dao.VoteOption(strings.ToUpper(string(option)))

// Update the tally
switch strings.ToUpper(option) {
switch option {
case dao.YesVote:
t.yays += member.VotingPower
case dao.AbstainVote:
Expand Down

0 comments on commit 5de54c5

Please sign in to comment.