Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,15 +539,28 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
}
false
},
ProxyType::SocialActions => matches!(
c,
RuntimeCall::Posts(..)
| RuntimeCall::Reactions(..)
| RuntimeCall::AccountFollows(..)
| RuntimeCall::SpaceFollows(..)
| RuntimeCall::Spaces(..)
| RuntimeCall::Profiles(..)
),
ProxyType::SocialActions => {
match c {
RuntimeCall::Utility(pallet_utility::Call::batch { calls }) |
RuntimeCall::Utility(pallet_utility::Call::batch_all { calls }) => {
for call in calls {
if !ProxyType::SocialActions.filter(call) {
return false;
}
}
return true;
},
_ => matches!(
c,
RuntimeCall::Posts(..)
| RuntimeCall::Reactions(..)
| RuntimeCall::AccountFollows(..)
| RuntimeCall::SpaceFollows(..)
| RuntimeCall::Spaces(..)
| RuntimeCall::Profiles(..)
)
}
}
// TODO: Think on this proxy type. We probably need this to extend `SocialActions` or either replace it.
ProxyType::Management => matches!(
c,
Expand Down