Skip to content

Commit

Permalink
fix: Entering the name of the function in interactive mode (#379)
Browse files Browse the repository at this point in the history
Resolves #376
  • Loading branch information
FroVolod authored Aug 4, 2024
1 parent 006e52e commit 9872f3a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/commands/contract/call_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ fn input_function_name(
.filter(|function| function_kind == function.kind)
.map(|function| function.name)
.collect::<Vec<String>>();
return Ok(Some(
Select::new(message, function_names).prompt()?.to_string(),
));
if !function_names.is_empty() {
return Ok(Some(
Select::new(message, function_names).prompt()?.to_string(),
));
}
}
}

Expand Down

0 comments on commit 9872f3a

Please sign in to comment.