diff --git a/cmd/soroban-cli/src/utils.rs b/cmd/soroban-cli/src/utils.rs index 389996d31..df79c47f0 100644 --- a/cmd/soroban-cli/src/utils.rs +++ b/cmd/soroban-cli/src/utils.rs @@ -22,10 +22,10 @@ pub async fn log_simulation_result( ) -> Result { match client.simulate_and_assemble_transaction(tx).await { Ok(outcome) => { - if !&outcome.sim_res.events.is_empty() { - crate::log::sim_diagnostic_events(&outcome.sim_res.events, tracing::Level::INFO); - } outcome.assembled.ok_or_else(|| { + if !&outcome.sim_res.events.is_empty() { + crate::log::sim_diagnostic_events(&outcome.sim_res.events, tracing::Level::INFO); + } if let Some(error) = outcome.sim_res.error { RPCError::TransactionSimulationFailed(error) } else {