Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypan committed Oct 2, 2024
1 parent 2ee127e commit 5a16091
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 30 deletions.
21 changes: 11 additions & 10 deletions runtime/krest/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,18 @@ impl SafeCallFilter {
/// Checks whether the base (non-composite) call is allowed to be executed via `Transact` XCM
/// instruction.
pub fn allow_base_call(call: &RuntimeCall) -> bool {
matches!(call,
matches!(
call,
RuntimeCall::System(..) |
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
)
}
/// Checks whether composite call is allowed to be executed via `Transact` XCM instruction.
Expand Down
21 changes: 11 additions & 10 deletions runtime/peaq-dev/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,18 @@ impl SafeCallFilter {
/// Checks whether the base (non-composite) call is allowed to be executed via `Transact` XCM
/// instruction.
pub fn allow_base_call(call: &RuntimeCall) -> bool {
matches!(call,
matches!(
call,
RuntimeCall::System(..) |
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
)
}
/// Checks whether composite call is allowed to be executed via `Transact` XCM instruction.
Expand Down
21 changes: 11 additions & 10 deletions runtime/peaq/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,18 @@ impl SafeCallFilter {
/// Checks whether the base (non-composite) call is allowed to be executed via `Transact` XCM
/// instruction.
pub fn allow_base_call(call: &RuntimeCall) -> bool {
matches!(call,
matches!(
call,
RuntimeCall::System(..) |
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
RuntimeCall::Balances(..) |
RuntimeCall::Vesting(..) |
RuntimeCall::Assets(..) |
RuntimeCall::PolkadotXcm(..) |
RuntimeCall::Session(..) |
RuntimeCall::Multisig(
pallet_multisig::Call::approve_as_multi { .. } |
pallet_multisig::Call::cancel_as_multi { .. },
)
)
}
/// Checks whether composite call is allowed to be executed via `Transact` XCM instruction.
Expand Down

0 comments on commit 5a16091

Please sign in to comment.