From a39472b3ad9d6a7a3312d124aa8874b34e9dfb56 Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Thu, 4 Feb 2021 12:13:13 -0400 Subject: [PATCH] Cancel Proxy Type (#2334) * cancel proxy * fix * Remove reject_announcement and add CancelProxy to westend Co-authored-by: David Dorgan --- polkadot/runtime/kusama/src/lib.rs | 4 ++++ polkadot/runtime/polkadot/src/lib.rs | 4 ++++ polkadot/runtime/westend/src/lib.rs | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index e66e5e9f7b..a50e34f5f5 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -846,6 +846,7 @@ pub enum ProxyType { Governance, Staking, IdentityJudgement, + CancelProxy, } impl Default for ProxyType { fn default() -> Self { Self::Any } } impl InstanceFilter for ProxyType { @@ -912,6 +913,9 @@ impl InstanceFilter for ProxyType { ProxyType::IdentityJudgement => matches!(c, Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + ), + ProxyType::CancelProxy => matches!(c, + Call::Proxy(pallet_proxy::Call::remove_announcement(..)) ) } } diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 69b62ec5ba..998bf52b12 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -828,6 +828,7 @@ pub enum ProxyType { Staking = 3, // Skip 4 as it is now removed (was SudoBalances) IdentityJudgement = 5, + CancelProxy = 6, } #[cfg(test)] @@ -916,6 +917,9 @@ impl InstanceFilter for ProxyType { ProxyType::IdentityJudgement => matches!(c, Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + ), + ProxyType::CancelProxy => matches!(c, + Call::Proxy(pallet_proxy::Call::remove_announcement(..)) ) } } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 05284e59f5..2bec3dc006 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -591,6 +591,7 @@ pub enum ProxyType { Staking, SudoBalances, IdentityJudgement, + CancelProxy, } impl Default for ProxyType { fn default() -> Self { Self::Any } } impl InstanceFilter for ProxyType { @@ -643,6 +644,9 @@ impl InstanceFilter for ProxyType { ProxyType::IdentityJudgement => matches!(c, Call::Identity(pallet_identity::Call::provide_judgement(..)) | Call::Utility(..) + ), + ProxyType::CancelProxy => matches!(c, + Call::Proxy(pallet_proxy::Call::remove_announcement(..)) ) } }