mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Replace T::AccountId with <T::Lookup as StaticLookup>::Source (#11670)
* initial * update * update * update * cargo fmt * update * update benchmarks * AccountIdLookupOf<T> * cargo fmt * fix conflits * cargo fmt * update Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -29,8 +29,6 @@ use crate::Pallet as Elections;
|
||||
|
||||
const BALANCE_FACTOR: u32 = 250;
|
||||
|
||||
type Lookup<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
/// grab new account with infinite balance.
|
||||
fn endowed_account<T: Config>(name: &'static str, index: u32) -> T::AccountId {
|
||||
let account: T::AccountId = account(name, index, 0);
|
||||
@@ -46,7 +44,7 @@ fn endowed_account<T: Config>(name: &'static str, index: u32) -> T::AccountId {
|
||||
}
|
||||
|
||||
/// Account to lookup type of system trait.
|
||||
fn as_lookup<T: Config>(account: T::AccountId) -> Lookup<T> {
|
||||
fn as_lookup<T: Config>(account: T::AccountId) -> AccountIdLookupOf<T> {
|
||||
T::Lookup::unlookup(account)
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ pub struct SeatHolder<AccountId, Balance> {
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::*;
|
||||
@@ -508,7 +510,7 @@ pub mod pallet {
|
||||
})]
|
||||
pub fn remove_member(
|
||||
origin: OriginFor<T>,
|
||||
who: <T::Lookup as StaticLookup>::Source,
|
||||
who: AccountIdLookupOf<T>,
|
||||
slash_bond: bool,
|
||||
rerun_election: bool,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
|
||||
Reference in New Issue
Block a user