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:
Doordashcon
2022-08-18 10:30:46 +01:00
committed by GitHub
parent 511e5c9651
commit d46f6f0d34
50 changed files with 465 additions and 309 deletions
+3 -2
View File
@@ -110,6 +110,7 @@ use sp_std::{fmt::Debug, prelude::*};
type BalanceOf<T, I> =
<<T as Config<I>>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
type PoolT<T, I> = Vec<(<T as frame_system::Config>::AccountId, Option<<T as Config<I>>::Score>)>;
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
/// The enum is supplied when refreshing the members set.
/// Depending on the enum variant the corresponding associated
@@ -346,7 +347,7 @@ pub mod pallet {
#[pallet::weight(0)]
pub fn kick(
origin: OriginFor<T>,
dest: <T::Lookup as StaticLookup>::Source,
dest: AccountIdLookupOf<T>,
index: u32,
) -> DispatchResult {
T::KickOrigin::ensure_origin(origin)?;
@@ -370,7 +371,7 @@ pub mod pallet {
#[pallet::weight(0)]
pub fn score(
origin: OriginFor<T>,
dest: <T::Lookup as StaticLookup>::Source,
dest: AccountIdLookupOf<T>,
index: u32,
score: T::Score,
) -> DispatchResult {