Skip to content

Commit

Permalink
Name the argument explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Jun 12, 2024
1 parent 16a70ba commit cf0d8e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/soroban-cli/src/commands/config/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ impl Data {
}

pub fn load_contract_id_or_default(
alias: &str,
alias_or_contract_id: &str,
config_dir: &Path,
network_passphrase: &str,
) -> Result<[u8; 32], Error> {
let contract_id = Self::get_contract_id(alias, config_dir, network_passphrase)?
.unwrap_or_else(|| alias.to_string());
let contract_id =
Self::get_contract_id(alias_or_contract_id, config_dir, network_passphrase)?
.unwrap_or_else(|| alias_or_contract_id.to_string());

soroban_spec_tools::utils::contract_id_from_str(&contract_id)
.map_err(|e| Error::CannotParseContractId(contract_id.clone(), e))
Expand Down

0 comments on commit cf0d8e8

Please sign in to comment.