Skip to content

Commit

Permalink
fix: add update proposal after voting
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamu committed Apr 22, 2024
1 parent 39e7987 commit 06356da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/gov/handle_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,10 @@ func (m *Module) handleVoteEvent(tx *juno.Tx, voter string, events sdk.StringEve

vote := types.NewVote(proposalID, voter, voteOption, txTimestamp, tx.Height)

return m.db.SaveVote(vote)
err = m.db.SaveVote(vote)
if err != nil {
return fmt.Errorf("error while saving vote: %s", err)
}

return m.UpdateProposal(tx.Height, txTimestamp, proposalID)
}

0 comments on commit 06356da

Please sign in to comment.