mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +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:
@@ -104,6 +104,8 @@ mod tests;
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
|
||||
#[frame_support::pallet]
|
||||
pub mod pallet {
|
||||
use super::{DispatchResult, *};
|
||||
@@ -192,7 +194,7 @@ pub mod pallet {
|
||||
#[pallet::weight(0)]
|
||||
pub fn set_key(
|
||||
origin: OriginFor<T>,
|
||||
new: <T::Lookup as StaticLookup>::Source,
|
||||
new: AccountIdLookupOf<T>,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
// This is a public call, so we ensure that the origin is some signed account.
|
||||
let sender = ensure_signed(origin)?;
|
||||
@@ -228,7 +230,7 @@ pub mod pallet {
|
||||
})]
|
||||
pub fn sudo_as(
|
||||
origin: OriginFor<T>,
|
||||
who: <T::Lookup as StaticLookup>::Source,
|
||||
who: AccountIdLookupOf<T>,
|
||||
call: Box<<T as Config>::Call>,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
// This is a public call, so we ensure that the origin is some signed account.
|
||||
|
||||
Reference in New Issue
Block a user