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:
Matteo Muraca
2024-02-19 14:19:25 +01:00
committed by GitHub
parent 197c6cf9e0
commit 435e339261
3 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -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())