diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 2826c18f3f7c..3ed979f1fdb3 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -21,7 +21,7 @@ use super::{ }; use assets_common::{ local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, - matching::{FromNetwork, FromSiblingParachain, IsForeignConcreteAsset}, + matching::{FromNetwork, IsSiblingParachainAsset}, }; use frame_support::{ match_types, parameter_types, @@ -523,7 +523,7 @@ pub type WaivedLocations = ( /// - Sibling parachains' assets from where they originate (as `ForeignCreators`). pub type TrustedTeleporters = ( ConcreteAssetFromSystem, - IsForeignConcreteAsset>>, + IsSiblingParachainAsset>, ); pub struct XcmConfig; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index cb2fedeb146f..4c30e8bf51b4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -21,7 +21,7 @@ use super::{ }; use assets_common::{ local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation, - matching::{FromSiblingParachain, IsForeignConcreteAsset}, + matching::IsSiblingParachainAsset, }; use frame_support::{ match_types, parameter_types, @@ -543,7 +543,7 @@ pub type WaivedLocations = ( /// - Sibling parachains' assets from where they originate (as `ForeignCreators`). pub type TrustedTeleporters = ( ConcreteAssetFromSystem, - IsForeignConcreteAsset>>, + IsSiblingParachainAsset>, ); pub struct XcmConfig; diff --git a/cumulus/parachains/runtimes/assets/common/src/matching.rs b/cumulus/parachains/runtimes/assets/common/src/matching.rs index d6ecc3ec99f0..0a43a75a83f1 100644 --- a/cumulus/parachains/runtimes/assets/common/src/matching.rs +++ b/cumulus/parachains/runtimes/assets/common/src/matching.rs @@ -26,14 +26,14 @@ frame_support::parameter_types! { pub ParentLocation: MultiLocation = MultiLocation::parent(); } -/// Accepts an asset if it is from the origin. -pub struct IsForeignConcreteAsset(sp_std::marker::PhantomData); -impl> ContainsPair - for IsForeignConcreteAsset +/// Accepts an asset if it is from a sibling parachain. +pub struct IsSiblingParachainAsset(sp_std::marker::PhantomData); +impl> ContainsPair + for IsSiblingParachainAsset { fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { - log::trace!(target: "xcm::contains", "IsForeignConcreteAsset asset: {:?}, origin: {:?}", asset, origin); - matches!(asset.id, Concrete(ref id) if IsForeign::contains(id, origin)) + log::trace!(target: "xcm::contains", "IsSiblingParachainAsset asset: {:?}, origin: {:?}", asset, origin); + matches!(asset.id, Concrete(ref id) if >::contains(id, origin)) } }