diff --git a/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs b/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs index bfe34df39f..1204da980b 100644 --- a/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs +++ b/cmd/soroban-cli/src/commands/contract/bindings/typescript.rs @@ -91,8 +91,8 @@ impl NetworkRunnable for Cmd { .map_err(|e| Error::CannotParseContractId(self.contract_id.clone(), e))?; get_remote_contract_spec( &contract_id, - self.locator.clone(), - self.network.clone(), + &self.locator, + &self.network, global_args, config, ) diff --git a/cmd/soroban-cli/src/commands/contract/invoke.rs b/cmd/soroban-cli/src/commands/contract/invoke.rs index d800a0326b..37b06514d7 100644 --- a/cmd/soroban-cli/src/commands/contract/invoke.rs +++ b/cmd/soroban-cli/src/commands/contract/invoke.rs @@ -349,8 +349,8 @@ impl NetworkRunnable for Cmd { let spec_entries = get_remote_contract_spec( &contract_id, - unwrap_config.locator.clone(), - unwrap_config.network.clone(), + &unwrap_config.locator, + &unwrap_config.network, global_args, config, ) diff --git a/cmd/soroban-cli/src/get_spec.rs b/cmd/soroban-cli/src/get_spec.rs index 59829f4a78..ca902b79c0 100644 --- a/cmd/soroban-cli/src/get_spec.rs +++ b/cmd/soroban-cli/src/get_spec.rs @@ -58,7 +58,7 @@ pub async fn get_remote_contract_spec( }; // Get the contract spec entries based on the executable type - let spec_entries = match executable { + Ok(match executable { ContractExecutable::Wasm(hash) => { let hash = hash.to_string(); if let Ok(entries) = data::read_spec(&hash) { @@ -74,7 +74,5 @@ pub async fn get_remote_contract_spec( ContractExecutable::StellarAsset => { soroban_spec::read::parse_raw(&soroban_sdk::token::StellarAssetSpec::spec_xdr())? } - }; - - Ok(spec_entries) + }) }