mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-31 16:09:52 +00:00
Introduce EnsureOrigin::try_successul_origin (#11558)
* Introduce `EnsureOrigin::try_successul_origin` * Formatting * Fixes * Add Morph * Fixes * Formatting
This commit is contained in:
1 parent
adf0773f9d
commit
9107ae41fd
6 files changed
+221
-97
No files matched your search
@@ -1272,9 +1272,9 @@ impl<T: Config> EnsureOrigin<T::Origin> for EnsureFounder<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn successful_origin() -> T::Origin {
|
||||
let founder = Founder::<T>::get().expect("society founder should exist");
|
||||
T::Origin::from(frame_system::RawOrigin::Signed(founder))
|
||||
fn try_successful_origin() -> Result<T::Origin, ()> {
|
||||
let founder = Founder::<T>::get().ok_or(())?;
|
||||
Ok(T::Origin::from(frame_system::RawOrigin::Signed(founder)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user