BREAKING: Rename Origin (#12258)

* BREAKING: Rename Origin

* more renaming

* a bit more renaming

* fix

* more fixing

* fix in frame_support

* even more fixes

* fix

* small fix

* ...

* update .stderr

* docs

* update docs

* update docs

* docs
This commit is contained in:
Sergej Sakac
2022-09-21 00:13:09 +02:00
committed by GitHub
parent 986d20b352
commit e4b6f4a66d
221 changed files with 5233 additions and 4200 deletions
+4 -2
View File
@@ -86,7 +86,7 @@ pub mod pallet {
/// An origin that can request a preimage be placed on-chain without a deposit or fee, or
/// manage existing preimages.
type ManagerOrigin: EnsureOrigin<Self::Origin>;
type ManagerOrigin: EnsureOrigin<Self::RuntimeOrigin>;
/// Max size allowed for a preimage.
type MaxSize: Get<u32>;
@@ -191,7 +191,9 @@ pub mod pallet {
impl<T: Config> Pallet<T> {
/// Ensure that the origin is either the `ManagerOrigin` or a signed origin.
fn ensure_signed_or_manager(origin: T::Origin) -> Result<Option<T::AccountId>, BadOrigin> {
fn ensure_signed_or_manager(
origin: T::RuntimeOrigin,
) -> Result<Option<T::AccountId>, BadOrigin> {
if T::ManagerOrigin::ensure_origin(origin.clone()).is_ok() {
return Ok(None)
}