From 336c98af839cacbc1163acc030b776f1edcfa6b1 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 28 Aug 2023 10:36:19 +0800 Subject: [PATCH] Fix compile (#1244) --- runtime/pangolin/src/pallets/orml_xtokens.rs | 10 +++++++--- runtime/pangolin/src/pallets/polkadot_xcm.rs | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/runtime/pangolin/src/pallets/orml_xtokens.rs b/runtime/pangolin/src/pallets/orml_xtokens.rs index 6fe92c644..e9c9dc1d3 100644 --- a/runtime/pangolin/src/pallets/orml_xtokens.rs +++ b/runtime/pangolin/src/pallets/orml_xtokens.rs @@ -30,7 +30,7 @@ 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 @@ -38,7 +38,7 @@ pub struct CurrencyIdtoMultiLocation(sp_std::marker::PhantomDat impl sp_runtime::traits::Convert> for CurrencyIdtoMultiLocation where - AssetXConverter: xcm_executor::traits::Convert, + AssetXConverter: xcm_executor::traits::Convert, { fn convert(currency: CurrencyId) -> Option { match currency { @@ -73,7 +73,11 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdtoMultiLocation< - xcm_primitives::AsAssetType, + xcm_primitives::AsAssetType< + crate::AssetId, + pallets::asset_manager::AssetType, + AssetManager, + >, >; type MaxAssetsForTransfer = MaxAssetsForTransfer; // We don't have this case: fee_reserve != non_fee_reserve diff --git a/runtime/pangolin/src/pallets/polkadot_xcm.rs b/runtime/pangolin/src/pallets/polkadot_xcm.rs index bea7f1ba7..9a11409ed 100644 --- a/runtime/pangolin/src/pallets/polkadot_xcm.rs +++ b/runtime/pangolin/src/pallets/polkadot_xcm.rs @@ -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, @@ -203,7 +203,7 @@ pub type XcmFeesToAccount = xcm_primitives::XcmFeesToAccount< Assets, ( xcm_builder::ConvertedConcreteId< - AssetId, + crate::AssetId, Balance, xcm_primitives::AsAssetType< crate::AssetId,