Skip to content

Commit

Permalink
Ensure checked add
Browse files Browse the repository at this point in the history
  • Loading branch information
eloylp committed Jul 27, 2023
1 parent cfcf87f commit 7bbab66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ impl ProposalVotingContract {
id,
Proposal {
id,
voting_end_time: env.ledger().timestamp() + voting_period_secs,
voting_end_time: env
.ledger()
.timestamp()
.checked_add(voting_period_secs)
.unwrap(),
target_approval_rate_bps,
votes: 0,
voters: Map::<Address, bool>::new(&env),
Expand Down

0 comments on commit 7bbab66

Please sign in to comment.