From a48f26c13b8e993cd3824f285a028fe09a396d6b Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 27 Sep 2024 13:45:56 +0200 Subject: [PATCH] fixes --- control/preimage/src/helpers.rs | 5 ----- control/preimage/src/main.rs | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/control/preimage/src/helpers.rs b/control/preimage/src/helpers.rs index 2855afee3e..01a9755244 100644 --- a/control/preimage/src/helpers.rs +++ b/control/preimage/src/helpers.rs @@ -178,14 +178,9 @@ pub fn utility_force_batch(calls: Vec) -> RelayRuntimeCall { } pub fn sudo(call: Box) -> RelayRuntimeCall { - #[cfg(feature = "paseo")] return RelayRuntimeCall::Sudo( crate::relay_runtime::runtime_types::pallet_sudo::pallet::Call::sudo { call }, ); - #[cfg(not(feature = "paseo"))] - return RelayRuntimeCall::Utility( - crate::relay_runtime::runtime_types::pallet_utility::pallet::Call::batch_all { calls }, - ); } pub fn force_xcm_version() -> AssetHubRuntimeCall { diff --git a/control/preimage/src/main.rs b/control/preimage/src/main.rs index 3cff93757b..2d2b8496d1 100644 --- a/control/preimage/src/main.rs +++ b/control/preimage/src/main.rs @@ -327,14 +327,15 @@ async fn run() -> Result<(), Box> { sudo(Box::new(utility_force_batch(vec![call1, call2]))) } Command::UpdateAsset(params) => { - send_xcm_asset_hub( + let call = send_xcm_asset_hub( &context, vec![ commands::make_asset_sufficient(params), commands::force_set_metadata(params), ], ) - .await? + .await?; + sudo(Box::new(call)) } Command::GatewayOperatingMode(params) => { let call = commands::gateway_operating_mode(¶ms.gateway_operating_mode);