Skip to content

Commit

Permalink
refactor: small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexD10S committed Nov 5, 2024
1 parent 2f6478b commit a1abb01
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions crates/pop-cli/src/commands/build/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub struct BuildSpecCommand {
#[arg(short = 'i', long = "id")]
pub(crate) id: Option<u32>,
/// Whether to keep localhost as a bootnode.
#[clap(long, default_value = "false")]
#[clap(long)]
pub(crate) default_bootnode: bool,
/// Type of the chain [default: development].
#[arg(short = 't', long = "type", value_enum)]
Expand Down Expand Up @@ -381,13 +381,13 @@ async fn guide_user_to_generate_spec(args: BuildSpecCommand) -> anyhow::Result<B
}
// Prompt relays chains based on the chain type
match chain_type {
ChainType::Live => {
ChainType::Live =>
for relay in RelayChain::VARIANTS {
if !matches!(
relay,
RelayChain::Westend
| RelayChain::Paseo | RelayChain::Kusama
| RelayChain::Polkadot
RelayChain::Westend |
RelayChain::Paseo | RelayChain::Kusama |
RelayChain::Polkadot
) {
continue;
} else {
Expand All @@ -397,15 +397,14 @@ async fn guide_user_to_generate_spec(args: BuildSpecCommand) -> anyhow::Result<B
relay.get_detailed_message().unwrap_or_default(),
);
}
}
},
_ => {
},
_ =>
for relay in RelayChain::VARIANTS {
if matches!(
relay,
RelayChain::Westend
| RelayChain::Paseo | RelayChain::Kusama
| RelayChain::Polkadot
RelayChain::Westend |
RelayChain::Paseo | RelayChain::Kusama |
RelayChain::Polkadot
) {
continue;
} else {
Expand All @@ -415,8 +414,7 @@ async fn guide_user_to_generate_spec(args: BuildSpecCommand) -> anyhow::Result<B
relay.get_detailed_message().unwrap_or_default(),
);
}
}
},
},
}

let relay_chain = prompt.interact()?.clone();
Expand Down

0 comments on commit a1abb01

Please sign in to comment.