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
+2 -2
View File
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::{Config, Pallet};
use crate::{Config, Key};
use codec::{Decode, Encode};
use frame_support::{dispatch::DispatchInfo, ensure};
use scale_info::TypeInfo;
@@ -86,7 +86,7 @@ where
info: &DispatchInfoOf<Self::Call>,
_len: usize,
) -> TransactionValidity {
let sudo_key: T::AccountId = <Pallet<T>>::key().ok_or(UnknownTransaction::CannotLookup)?;
let sudo_key: T::AccountId = Key::<T>::get().ok_or(UnknownTransaction::CannotLookup)?;
ensure!(*who == sudo_key, InvalidTransaction::BadSigner);
Ok(ValidTransaction {