Skip to content

Commit

Permalink
conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Sep 27, 2024
1 parent a48f26c commit cdce3f7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions control/preimage/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ async fn run() -> Result<(), Box<dyn std::error::Error>> {
.await?;
let call2 =
send_xcm_asset_hub(&context, vec![force_xcm_version(), set_ethereum_fee]).await?;
sudo(Box::new(utility_force_batch(vec![call1, call2])))
if cfg!(any(feature = "paseo", feature = "westend")) {
sudo(Box::new(utility_force_batch(vec![call1, call2])))
} else {
utility_force_batch(vec![call1, call2])
}
}
Command::UpdateAsset(params) => {
let call = send_xcm_asset_hub(
Expand All @@ -335,7 +339,11 @@ async fn run() -> Result<(), Box<dyn std::error::Error>> {
],
)
.await?;
sudo(Box::new(call))
if cfg!(any(feature = "paseo", feature = "westend")) {
sudo(Box::new(call))
} else {
call
}
}
Command::GatewayOperatingMode(params) => {
let call = commands::gateway_operating_mode(&params.gateway_operating_mode);
Expand Down

0 comments on commit cdce3f7

Please sign in to comment.