mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Proxy for Nomination Pools (#6846)
* add proxy for nomination pools * fmt --------- Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -940,6 +940,7 @@ pub enum ProxyType {
|
|||||||
CancelProxy,
|
CancelProxy,
|
||||||
Auction,
|
Auction,
|
||||||
Society,
|
Society,
|
||||||
|
NominationPools,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ProxyType {
|
impl Default for ProxyType {
|
||||||
@@ -1024,6 +1025,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::FastUnstake(..)
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
ProxyType::NominationPools => {
|
||||||
|
matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..))
|
||||||
|
},
|
||||||
ProxyType::IdentityJudgement => matches!(
|
ProxyType::IdentityJudgement => matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
|
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
|
||||||
|
|||||||
@@ -924,6 +924,7 @@ pub enum ProxyType {
|
|||||||
IdentityJudgement = 5,
|
IdentityJudgement = 5,
|
||||||
CancelProxy = 6,
|
CancelProxy = 6,
|
||||||
Auction = 7,
|
Auction = 7,
|
||||||
|
NominationPools = 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@@ -1034,6 +1035,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::FastUnstake(..)
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
ProxyType::NominationPools => {
|
||||||
|
matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..))
|
||||||
|
},
|
||||||
ProxyType::IdentityJudgement => matches!(
|
ProxyType::IdentityJudgement => matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
|
RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) |
|
||||||
|
|||||||
@@ -765,6 +765,7 @@ pub enum ProxyType {
|
|||||||
IdentityJudgement,
|
IdentityJudgement,
|
||||||
CancelProxy,
|
CancelProxy,
|
||||||
Auction,
|
Auction,
|
||||||
|
NominationPools,
|
||||||
}
|
}
|
||||||
impl Default for ProxyType {
|
impl Default for ProxyType {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
@@ -824,6 +825,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::FastUnstake(..)
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
ProxyType::NominationPools => {
|
||||||
|
matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..))
|
||||||
|
},
|
||||||
ProxyType::SudoBalances => match c {
|
ProxyType::SudoBalances => match c {
|
||||||
RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => {
|
RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => {
|
||||||
matches!(x.as_ref(), &RuntimeCall::Balances(..))
|
matches!(x.as_ref(), &RuntimeCall::Balances(..))
|
||||||
|
|||||||
Reference in New Issue
Block a user