Skip to content

Commit

Permalink
Filter our force_transfer call
Browse files Browse the repository at this point in the history
  • Loading branch information
F3Joule committed Nov 29, 2023
1 parent bba154e commit 50ae108
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ impl Contains<RuntimeCall> for BaseFilter {
fn contains(c: &RuntimeCall) -> bool {
let is_set_balance =
matches!(c, RuntimeCall::Balances(pallet_balances::Call::set_balance { .. }));
let is_force_transfer =
matches!(c, RuntimeCall::Balances(pallet_balances::Call::force_transfer { .. }));

match *c {
RuntimeCall::Balances(..) if is_set_balance => false,
RuntimeCall::Balances(..) if is_set_balance || is_force_transfer => false,
_ => true,
}
}
Expand Down

0 comments on commit 50ae108

Please sign in to comment.