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:
DoordashconandOliver Tale-Yazdi authored and GitHub committed 2022-08-18 09:30:46 +00:00
1 parent 511e5c9651
commit d46f6f0d34
50 files changed
+465 -309

No files matched your search

+3 -5
View File
@@ -47,6 +47,7 @@ type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
type BalanceOf<T> = <<T as Config>::Currency as Currency<AccountIdOf<T>>>::Balance;
type NegativeImbalanceOf<T> =
<<T as Config>::Currency as Currency<AccountIdOf<T>>>::NegativeImbalance;
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
#[frame_support::pallet]
pub mod pallet {
@@ -193,10 +194,7 @@ pub mod pallet {
/// - One event.
/// # </weight>
#[pallet::weight(70_000_000)]
pub fn kill_name(
origin: OriginFor<T>,
target: <T::Lookup as StaticLookup>::Source,
) -> DispatchResult {
pub fn kill_name(origin: OriginFor<T>, target: AccountIdLookupOf<T>) -> DispatchResult {
T::ForceOrigin::ensure_origin(origin)?;
// Figure out who we're meant to be clearing.
@@ -225,7 +223,7 @@ pub mod pallet {
#[pallet::weight(70_000_000)]
pub fn force_name(
origin: OriginFor<T>,
target: <T::Lookup as StaticLookup>::Source,
target: AccountIdLookupOf<T>,
name: Vec<u8>,
) -> DispatchResult {
T::ForceOrigin::ensure_origin(origin)?;