mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 23:21:02 +00:00
removed pallet::getter from pallet-sudo (#3370)
part of #3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <mmuraca247@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -329,7 +329,6 @@ pub mod pallet {
|
||||
|
||||
/// The `AccountId` of the sudo key.
|
||||
#[pallet::storage]
|
||||
#[pallet::getter(fn key)]
|
||||
pub(super) type Key<T: Config> = StorageValue<_, T::AccountId, OptionQuery>;
|
||||
|
||||
#[pallet::genesis_config]
|
||||
@@ -352,7 +351,7 @@ pub mod pallet {
|
||||
let sender = ensure_signed_or_root(origin)?;
|
||||
|
||||
if let Some(sender) = sender {
|
||||
if Self::key().map_or(false, |k| k == sender) {
|
||||
if Key::<T>::get().map_or(false, |k| k == sender) {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(Error::<T>::RequireSudo.into())
|
||||
|
||||
Reference in New Issue
Block a user