Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexD10S committed Dec 6, 2024
1 parent 5051901 commit 52b8236
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions crates/pop-cli/src/commands/call/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?
{
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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()
}
}

Expand Down Expand Up @@ -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()?
{
Expand Down

0 comments on commit 52b8236

Please sign in to comment.