Skip to content

Commit

Permalink
Obey quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMD committed Nov 20, 2024
1 parent 5f0f9bc commit b100ab3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd/soroban-cli/src/commands/tx/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl NetworkRunnable for Cmd {
type Result = GetTransactionResponse;
async fn run_against_rpc_server(
&self,
_: Option<&global::Args>,
globals: Option<&global::Args>,
config: Option<&config::Args>,
) -> Result<Self::Result, Self::Error> {
let network = if let Some(config) = config {
Expand All @@ -59,10 +59,12 @@ impl NetworkRunnable for Cmd {
let tx_env = super::xdr::tx_envelope_from_stdin()?;
match super::xdr::unwrap_envelope_v1(tx_env.clone()).map(|tx| transaction_hash(&tx, &network.network_passphrase)) {
Ok(Ok(hash)) => {
println!(
"Transaction Hash: {}",
hex::encode(hash)
);
if !globals.map_or(false, |g| g.quiet) {
println!(
"Transaction Hash: {}",
hex::encode(hash)
);
}
}
_ => {
}
Expand Down

0 comments on commit b100ab3

Please sign in to comment.