Skip to content

Commit

Permalink
use matches!
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Dec 11, 2023
1 parent ce8695b commit 0984aa6
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ use snowbridge_router_primitives::outbound::EthereumBlobExporter;
pub struct NonAssetHubTokenTransfers;
impl ContainsPair<InteriorMultiLocation, Message> for NonAssetHubTokenTransfers {
fn contains(origin: &InteriorMultiLocation, message: &Message) -> bool {
if let Command::AgentExecute {
command: AgentExecuteCommand::TransferToken { .. }, ..
} = message.command
{
return origin != &X1(Parachain(ASSET_HUB_ID));
}
return false;
matches!(
message.command,
Command::AgentExecute { command: AgentExecuteCommand::TransferToken { .. }, .. }
) && origin != &X1(Parachain(ASSET_HUB_ID))
}
}

Expand Down

0 comments on commit 0984aa6

Please sign in to comment.