Skip to content

Commit 8a343df

Browse files
Cleanup
1 parent e99245c commit 8a343df

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

cmd/crates/soroban-test/tests/it/integration/tx.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ use soroban_cli::assembled::simulate_and_assemble_transaction;
22
use soroban_cli::xdr::{Limits, ReadXdr, TransactionEnvelope, WriteXdr};
33
use soroban_test::{AssertExt, TestEnv};
44

5-
use crate::integration::util::{deploy_contract, DeployKind, DeployOptions, HELLO_WORLD, test_address};
5+
use crate::integration::util::{
6+
deploy_contract, test_address, DeployKind, DeployOptions, HELLO_WORLD,
7+
};
68

79
pub mod operations;
810

cmd/soroban-cli/src/commands/tx/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use super::global;
22

33
pub mod args;
4-
pub mod update;
54
pub mod edit;
65
pub mod hash;
76
pub mod help;
@@ -10,6 +9,7 @@ pub mod op;
109
pub mod send;
1110
pub mod sign;
1211
pub mod simulate;
12+
pub mod update;
1313
pub mod xdr;
1414

1515
pub use args::Args;
@@ -40,8 +40,6 @@ pub enum Cmd {
4040

4141
#[derive(thiserror::Error, Debug)]
4242
pub enum Error {
43-
#[error(transparent)]
44-
Update(#[from] update::Error),
4543
#[error(transparent)]
4644
Hash(#[from] hash::Error),
4745
#[error(transparent)]
@@ -58,19 +56,21 @@ pub enum Error {
5856
Args(#[from] args::Error),
5957
#[error(transparent)]
6058
Simulate(#[from] simulate::Error),
59+
#[error(transparent)]
60+
Update(#[from] update::Error),
6161
}
6262

6363
impl Cmd {
6464
pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
6565
match self {
66-
Cmd::Update(cmd) => cmd.run(global_args).await?,
6766
Cmd::Hash(cmd) => cmd.run(global_args)?,
6867
Cmd::New(cmd) => cmd.run(global_args).await?,
6968
Cmd::Edit(cmd) => cmd.run(global_args)?,
7069
Cmd::Operation(cmd) => cmd.run(global_args).await?,
7170
Cmd::Send(cmd) => cmd.run(global_args).await?,
7271
Cmd::Sign(cmd) => cmd.run(global_args).await?,
7372
Cmd::Simulate(cmd) => cmd.run(global_args).await?,
73+
Cmd::Update(cmd) => cmd.run(global_args).await?,
7474
};
7575
Ok(())
7676
}

cmd/soroban-cli/src/commands/tx/update/sequence_number/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ mod next;
44

55
#[derive(Debug, clap::Subcommand)]
66
pub enum Cmd {
7-
87
/// Fetch the source account's seq-num and increment for the given tx
98
#[command()]
109
Next(next::Cmd),

cmd/soroban-cli/src/commands/tx/update/sequence_number/next.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ use crate::{
22
commands::{
33
global,
44
tx::xdr::{tx_envelope_from_input, Error as XdrParsingError},
5-
}, config, xdr::{self, SequenceNumber, TransactionEnvelope, WriteXdr}
5+
},
6+
config,
7+
xdr::{self, SequenceNumber, TransactionEnvelope, WriteXdr},
68
};
79

810
#[derive(clap::Parser, Debug, Clone)]
@@ -53,11 +55,12 @@ impl Cmd {
5355
Ok(())
5456
}
5557

56-
async fn current_seq_num(&self) -> Result<i64, Error>{
58+
async fn current_seq_num(&self) -> Result<i64, Error> {
5759
let network = &self.config.get_network()?;
5860
let client = network.rpc_client()?;
59-
client.verify_network_passphrase(Some(&network.network_passphrase))
60-
.await?;
61+
client
62+
.verify_network_passphrase(Some(&network.network_passphrase))
63+
.await?;
6164

6265
let muxed_account = self.config.source_account().await?;
6366

@@ -66,7 +69,7 @@ impl Cmd {
6669
soroban_sdk::xdr::MuxedAccount::MuxedEd25519(muxed_account) => muxed_account.ed25519.0,
6770
};
6871
let address = stellar_strkey::ed25519::PublicKey(bytes).to_string();
69-
72+
7073
let account = client.get_account(&address).await?;
7174
Ok(account.seq_num.as_ref().clone())
7275
}

0 commit comments

Comments
 (0)