mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
This PR reverts #2280 which introduced `TransactionExtension` to replace `SignedExtension`. As a result of the discussion [here](https://github.com/paritytech/polkadot-sdk/pull/3623#issuecomment-1986789700), the changes will be reverted for now with plans to reintroduce the concept in the future. --------- Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
This commit is contained in:
@@ -482,7 +482,7 @@ pub trait OriginTrait: Sized {
|
||||
type Call;
|
||||
|
||||
/// The caller origin, overarching type of all pallets origins.
|
||||
type PalletsOrigin: Send + Sync + Into<Self> + CallerTrait<Self::AccountId> + MaxEncodedLen;
|
||||
type PalletsOrigin: Into<Self> + CallerTrait<Self::AccountId> + MaxEncodedLen;
|
||||
|
||||
/// The AccountId used across the system.
|
||||
type AccountId;
|
||||
@@ -496,14 +496,6 @@ pub trait OriginTrait: Sized {
|
||||
/// Replace the caller with caller from the other origin
|
||||
fn set_caller_from(&mut self, other: impl Into<Self>);
|
||||
|
||||
/// Replace the caller with caller from the other origin
|
||||
fn set_caller(&mut self, caller: Self::PalletsOrigin);
|
||||
|
||||
/// Replace the caller with caller from the other origin
|
||||
fn set_caller_from_signed(&mut self, caller_account: Self::AccountId) {
|
||||
self.set_caller(Self::PalletsOrigin::from(RawOrigin::Signed(caller_account)))
|
||||
}
|
||||
|
||||
/// Filter the call if caller is not root, if false is returned then the call must be filtered
|
||||
/// out.
|
||||
///
|
||||
@@ -552,17 +544,6 @@ pub trait OriginTrait: Sized {
|
||||
fn as_system_ref(&self) -> Option<&RawOrigin<Self::AccountId>> {
|
||||
self.caller().as_system_ref()
|
||||
}
|
||||
|
||||
/// Extract a reference to the sytsem signer, if that's what the caller is.
|
||||
fn as_system_signer(&self) -> Option<&Self::AccountId> {
|
||||
self.caller().as_system_ref().and_then(|s| {
|
||||
if let RawOrigin::Signed(ref who) = s {
|
||||
Some(who)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user