Skip to content

Commit

Permalink
Fix compile (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored Aug 28, 2023
1 parent 2235bd4 commit 336c98a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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

0 comments on commit 336c98a

Please sign in to comment.