Skip to content

Commit

Permalink
fix after re-review Jacob
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed Oct 3, 2023
1 parent 6746ec9 commit b1eab55
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions contracts/modules/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ pub trait StakingModule {
#[endpoint(cancelVoteSlashMember)]
fn cancel_vote_slash_member(&self, member_to_slash: ManagedAddress) {
let caller = self.blockchain().get_caller();
require!(
self.is_staked_board_member(&caller),
NOT_ENOUGH_STAKE_ERR_MSG
);

let _ = self
.slashing_proposal_voters(&member_to_slash)
Expand Down Expand Up @@ -150,6 +146,11 @@ pub trait StakingModule {
#[inline]
fn add_board_member(&self, user: ManagedAddress) {
let _ = self.user_whitelist().insert(user);
let nr_board_members = self.user_whitelist().len();
require!(
nr_board_members <= MAXIMUM_BOARD_MEMBERS,
"Too many board members"
);
}

fn remove_board_member(&self, user: &ManagedAddress) {
Expand Down

0 comments on commit b1eab55

Please sign in to comment.