-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
201 representative role approval (#202)
* Representative approval * Check of the Representative waiting list * Representative approval call
- Loading branch information
Showing
6 changed files
with
48 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
//Helper functions that will be used in proposal's calls | ||
//helper 1) get shares/owners from asset_id | ||
pub use super::*; | ||
|
||
pub use frame_support::pallet_prelude::*; | ||
impl<T: Config> Pallet<T> { | ||
pub fn approve_representative(caller: T::AccountId, who:T::AccountId) -> DispatchResult{ | ||
let mut representative = Roles::Pallet::<T>::get_pending_representatives(&who).unwrap(); | ||
representative.activated = true; | ||
representative.assets_accounts.push(caller.clone()); | ||
Roles::RepresentativeLog::<T>::insert(&who,representative); | ||
Roles::RepApprovalList::<T>::remove(&who); | ||
Roles::AccountsRolesLog::<T>::insert(&who, Roles::Accounts::REPRESENTATIVE); | ||
|
||
Ok(()) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters