Skip to content

Commit

Permalink
fix: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jun 21, 2024
1 parent 348d647 commit 61907ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/crates/soroban-test/tests/it/integration/tx.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use soroban_cli::commands::tx;
use soroban_sdk::xdr::{
Limits, ReadXdr, TransactionEnvelope, TransactionV1Envelope, VecM, WriteXdr,
};
use soroban_sdk::xdr::{Limits, ReadXdr, TransactionEnvelope, WriteXdr};
use soroban_test::{AssertExt, TestEnv};

use crate::integration::util::{deploy_contract, DeployKind, HELLO_WORLD};
Expand All @@ -11,7 +8,6 @@ async fn txn_simulate() {
let sandbox = &TestEnv::new();
let xdr_base64_build_only = deploy_contract(sandbox, HELLO_WORLD, DeployKind::BuildOnly).await;
let xdr_base64_sim_only = deploy_contract(sandbox, HELLO_WORLD, DeployKind::SimOnly).await;
let cmd = tx::simulate::Cmd::default();
let tx_env =
TransactionEnvelope::from_xdr_base64(&xdr_base64_build_only, Limits::none()).unwrap();
let tx = soroban_cli::commands::tx::xdr::unwrap_envelope_v1(tx_env).unwrap();
Expand All @@ -23,7 +19,11 @@ async fn txn_simulate() {
.success()
.stdout_as_str();
assert_eq!(xdr_base64_sim_only, assembled_str);
let assembled = cmd.simulate(tx, &sandbox.client()).await.unwrap();
let assembled = sandbox
.client()
.simulate_and_assemble_transaction(&tx)
.await
.unwrap();
let txn_env: TransactionEnvelope = assembled.transaction().clone().into();
assert_eq!(
txn_env.to_xdr_base64(Limits::none()).unwrap(),
Expand Down

0 comments on commit 61907ca

Please sign in to comment.