Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
use matches!
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Dec 17, 2023
1 parent 4660ab4 commit 6252d96
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,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 6252d96

Please sign in to comment.