Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Oct 3, 2024
1 parent 016068c commit 264715f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cmd/crates/soroban-test/tests/it/integration/tx.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use soroban_cli::assembled::simulate_and_assemble_transaction;
use soroban_sdk::xdr::{Limits, ReadXdr, TransactionEnvelope, WriteXdr};
use soroban_test::{AssertExt, TestEnv};

Expand All @@ -23,10 +24,9 @@ async fn simulate() {
.success()
.stdout_as_str();
assert_eq!(xdr_base64_sim_only, assembled_str);
let assembled =
soroban_cli::assembled::simulate_and_assemble_transaction(sandbox.client(), &tx)
.await
.unwrap();
let assembled = simulate_and_assemble_transaction(&sandbox.client(), &tx)
.await
.unwrap();
let txn_env: TransactionEnvelope = assembled.transaction().clone().into();
assert_eq!(
txn_env.to_xdr_base64(Limits::none()).unwrap(),
Expand Down
9 changes: 7 additions & 2 deletions cmd/soroban-cli/src/commands/contract/extend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ use soroban_env_host::xdr::{
};

use crate::{
assembled::simulate_and_assemble_transaction, commands::{
assembled::simulate_and_assemble_transaction,
commands::{
global,
txn_result::{TxnEnvelopeResult, TxnResult},
NetworkRunnable,
}, config::{self, data, locator, network}, key, rpc::{self, Client}, wasm, Pwd
},
config::{self, data, locator, network},
key,
rpc::{self, Client},
wasm, Pwd,
};

const MAX_LEDGERS_TO_EXTEND: u32 = 535_679;
Expand Down
4 changes: 1 addition & 3 deletions cmd/soroban-cli/src/commands/contract/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ impl NetworkRunnable for Cmd {

print.infoln("Simulating install transaction…");

let txn =
simulate_and_assemble_transaction(&client, &tx_without_preflight)
.await?;
let txn = simulate_and_assemble_transaction(&client, &tx_without_preflight).await?;
let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone();

if self.fee.sim_only {
Expand Down

0 comments on commit 264715f

Please sign in to comment.