Skip to content

Commit

Permalink
Remove votes when swapping members in Senate
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubberbandits committed Jun 29, 2023
1 parent ba56533 commit 340bdfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ impl MemberManagement<AccountId> for ManageSenateMembers {
SenateMembers::remove_member(RawOrigin::Root.into(), who)
}

fn swap_member(remove: &AccountId, add: &AccountId) -> DispatchResult {
let remove = Address::Id( remove.clone() );
fn swap_member(rm: &AccountId, add: &AccountId) -> DispatchResult {
let remove = Address::Id( rm.clone() );
let add = Address::Id( add.clone() );

Triumvirate::remove_votes(rm)?;
SenateMembers::swap_member(RawOrigin::Root.into(), remove, add)
}

Expand Down

0 comments on commit 340bdfc

Please sign in to comment.