NonTransfer should be a superset of collator selection (#1385)

* This should ideally be set.

* Not convinced guard order is always guarenteed.

* assets / uniques should not be included.

* correction
This commit is contained in:
Squirrel
2022-06-18 15:06:52 +01:00
committed by GitHub
parent ad6fe6d191
commit 39a5f24477
3 changed files with 6 additions and 0 deletions
@@ -377,6 +377,7 @@ impl InstanceFilter<Call> for ProxyType {
),
}
}
fn is_superset(&self, o: &Self) -> bool {
match (self, o) {
(x, y) if x == y => true,
@@ -384,6 +385,7 @@ impl InstanceFilter<Call> for ProxyType {
(_, ProxyType::Any) => false,
(ProxyType::Assets, ProxyType::AssetOwner) => true,
(ProxyType::Assets, ProxyType::AssetManager) => true,
(ProxyType::NonTransfer, ProxyType::Collator) => true,
_ => false,
}
}
@@ -407,6 +407,7 @@ impl InstanceFilter<Call> for ProxyType {
),
}
}
fn is_superset(&self, o: &Self) -> bool {
match (self, o) {
(x, y) if x == y => true,
@@ -414,6 +415,7 @@ impl InstanceFilter<Call> for ProxyType {
(_, ProxyType::Any) => false,
(ProxyType::Assets, ProxyType::AssetOwner) => true,
(ProxyType::Assets, ProxyType::AssetManager) => true,
(ProxyType::NonTransfer, ProxyType::Collator) => true,
_ => false,
}
}
@@ -372,6 +372,7 @@ impl InstanceFilter<Call> for ProxyType {
),
}
}
fn is_superset(&self, o: &Self) -> bool {
match (self, o) {
(x, y) if x == y => true,
@@ -379,6 +380,7 @@ impl InstanceFilter<Call> for ProxyType {
(_, ProxyType::Any) => false,
(ProxyType::Assets, ProxyType::AssetOwner) => true,
(ProxyType::Assets, ProxyType::AssetManager) => true,
(ProxyType::NonTransfer, ProxyType::Collator) => true,
_ => false,
}
}