From dbb52bba3658010a28fa3add43c78402184dca76 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Wed, 18 Oct 2023 16:11:38 +0000 Subject: [PATCH] fix: use feature gate for foreign-assets gov --- --- a/runtime/common/config/pallets/foreign_asset.rs +++ b/runtime/common/config/pallets/foreign_asset.rs @@ -4,10 +4,15 @@ use staging_xcm::prelude::*; use staging_xcm_builder::AccountKey20Aliases; +#[cfg(feature = "governance")] +use crate::runtime_common::config::governance; + +#[cfg(not(feature = "governance"))] +use frame_system::EnsureRoot; + use crate::{ runtime_common::config::{ ethereum::CrossAccountId as ConfigCrossAccountId, - governance, xcm::{LocationToAccountId, SelfLocation}, }, RelayNetwork, Runtime, RuntimeEvent, @@ -35,7 +40,13 @@ impl pallet_foreign_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; + + #[cfg(feature = "governance")] type ForceRegisterOrigin = governance::RootOrTechnicalCommitteeMember; + + #[cfg(not(feature = "governance"))] + type ForceRegisterOrigin = EnsureRoot; + type PalletId = ForeignAssetPalletId; type SelfLocation = SelfLocation; type LocationToAccountId = LocationToCrossAccountId; -- gitstuff