From 5aa799c0b27d06b09db251a26ce5d372e5ffdfd4 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:50:20 -0500 Subject: [PATCH] Fix `stellar contract deploy` logging order (#1856) --- cmd/soroban-cli/src/commands/contract/deploy/wasm.rs | 5 +++-- cmd/soroban-cli/src/commands/contract/upload.rs | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs index 58ccac7f5..f793d61bd 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs @@ -288,11 +288,12 @@ impl NetworkRunnable for Cmd { return Ok(TxnResult::Txn(txn)); } - print.globeln("Submitting deploy transaction…"); print.log_transaction(&txn, &network, true)?; + let signed_txn = &config.sign_with_local_key(*txn).await?; + print.globeln("Submitting deploy transaction…"); let get_txn_resp = client - .send_transaction_polling(&config.sign_with_local_key(*txn).await?) + .send_transaction_polling(signed_txn) .await? .try_into()?; diff --git a/cmd/soroban-cli/src/commands/contract/upload.rs b/cmd/soroban-cli/src/commands/contract/upload.rs index 0a9ec856d..a03d3c6b3 100644 --- a/cmd/soroban-cli/src/commands/contract/upload.rs +++ b/cmd/soroban-cli/src/commands/contract/upload.rs @@ -192,11 +192,10 @@ impl NetworkRunnable for Cmd { return Ok(TxnResult::Txn(txn)); } - print.globeln("Submitting install transaction…"); + let signed_txn = &self.config.sign_with_local_key(*txn).await?; - let txn_resp = client - .send_transaction_polling(&self.config.sign_with_local_key(*txn).await?) - .await?; + print.globeln("Submitting install transaction…"); + let txn_resp = client.send_transaction_polling(signed_txn).await?; if args.map_or(true, |a| !a.no_cache) { data::write(txn_resp.clone().try_into().unwrap(), &network.rpc_uri()?)?;