From d6bed369968b5c99cc2b29ae6d381174e58098ad Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Fri, 6 Dec 2024 16:23:06 +0100 Subject: [PATCH] chore: fmt --- crates/pop-cli/src/commands/call/parachain.rs | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/crates/pop-cli/src/commands/call/parachain.rs b/crates/pop-cli/src/commands/call/parachain.rs index 009c55cd..4650ee76 100644 --- a/crates/pop-cli/src/commands/call/parachain.rs +++ b/crates/pop-cli/src/commands/call/parachain.rs @@ -75,9 +75,8 @@ impl CallParachainCommand { break; } - if !prompt_to_repeat_call - || !cli - .confirm("Do you want to perform another call?") + if !prompt_to_repeat_call || + !cli.confirm("Do you want to perform another call?") .initial_value(false) .interact()? { @@ -140,9 +139,8 @@ impl CallParachainCommand { // Resolve extrinsic. let extrinsic = match self.extrinsic { - Some(ref extrinsic_name) => { - find_extrinsic_by_name(&chain.pallets, &pallet.name, extrinsic_name).await? - }, + Some(ref extrinsic_name) => + find_extrinsic_by_name(&chain.pallets, &pallet.name, extrinsic_name).await?, None => { let mut prompt_extrinsic = cli.select("Select the extrinsic to call:"); for extrinsic in &pallet.extrinsics { @@ -179,9 +177,8 @@ impl CallParachainCommand { // Resolve who is signing the extrinsic. let suri = match self.suri.as_ref() { Some(suri) => suri.clone(), - None => { - cli.input("Signer of the extrinsic:").default_input(DEFAULT_URI).interact()? - }, + None => + cli.input("Signer of the extrinsic:").default_input(DEFAULT_URI).interact()?, }; return Ok(CallParachain { @@ -203,11 +200,11 @@ impl CallParachainCommand { // Function to check if all required fields are specified. fn requires_user_input(&self) -> bool { - self.pallet.is_none() - || self.extrinsic.is_none() - || self.args.is_empty() - || self.url.is_none() - || self.suri.is_none() + self.pallet.is_none() || + self.extrinsic.is_none() || + self.args.is_empty() || + self.url.is_none() || + self.suri.is_none() } } @@ -275,9 +272,8 @@ impl CallParachain { tx: DynamicPayload, cli: &mut impl Cli, ) -> Result<()> { - if !self.skip_confirm - && !cli - .confirm("Do you want to submit the extrinsic?") + if !self.skip_confirm && + !cli.confirm("Do you want to submit the extrinsic?") .initial_value(true) .interact()? {