Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile #1244

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions runtime/pangolin/src/pallets/orml_xtokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ pub enum CurrencyId {
// Our native token
SelfReserve,
// Assets representing other chains native tokens
ForeignAsset(AssetId),
ForeignAsset(crate::AssetId),
}

// How to convert from CurrencyId to MultiLocation
pub struct CurrencyIdtoMultiLocation<AssetXConverter>(sp_std::marker::PhantomData<AssetXConverter>);
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<MultiLocation>>
for CurrencyIdtoMultiLocation<AssetXConverter>
where
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, AssetId>,
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, crate::AssetId>,
{
fn convert(currency: CurrencyId) -> Option<MultiLocation> {
match currency {
Expand Down Expand Up @@ -73,7 +73,11 @@ impl orml_xtokens::Config for Runtime {
type BaseXcmWeight = BaseXcmWeight;
type CurrencyId = CurrencyId;
type CurrencyIdConvert = CurrencyIdtoMultiLocation<
xcm_primitives::AsAssetType<AssetId, xcm_configs::AssetType, AssetManager>,
xcm_primitives::AsAssetType<
crate::AssetId,
pallets::asset_manager::AssetType,
AssetManager,
>,
>;
type MaxAssetsForTransfer = MaxAssetsForTransfer;
// We don't have this case: fee_reserve != non_fee_reserve
Expand Down
4 changes: 2 additions & 2 deletions runtime/pangolin/src/pallets/polkadot_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub type ForeignFungiblesTransactor = xcm_builder::FungiblesAdapter<
// Use this currency when it is a fungible asset matching the given location or name:
(
xcm_builder::ConvertedConcreteId<
AssetId,
crate::AssetId,
Balance,
xcm_primitives::AsAssetType<
crate::AssetId,
Expand Down Expand Up @@ -203,7 +203,7 @@ pub type XcmFeesToAccount = xcm_primitives::XcmFeesToAccount<
Assets,
(
xcm_builder::ConvertedConcreteId<
AssetId,
crate::AssetId,
Balance,
xcm_primitives::AsAssetType<
crate::AssetId,
Expand Down
Loading