Skip to content

Commit

Permalink
clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Sep 25, 2024
1 parent 4a3aed8 commit a86af7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/tx/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Cmd {
pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
let tx_env = super::xdr::tx_envelope_from_stdin()?;
let tx_env_signed = self.sign_with.sign_tx_env(
tx_env,
&tx_env,
&self.locator,
&self.network.get(&self.locator)?,
global_args.quiet,
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/config/sign_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct Args {
impl Args {
pub fn sign_tx_env(
&self,
tx: TransactionEnvelope,
tx: &TransactionEnvelope,
locator: &locator::Args,
network: &Network,
quiet: bool,
Expand Down
6 changes: 3 additions & 3 deletions cmd/soroban-cli/src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ impl Signer {
tx,
signatures: VecM::default(),
});
self.sign_tx_env(tx_env, network)
self.sign_tx_env(&tx_env, network)
}

pub fn sign_tx_env(
&self,
tx_env: TransactionEnvelope,
tx_env: &TransactionEnvelope,
network: &Network,
) -> Result<TransactionEnvelope, Error> {
match &tx_env {
Expand All @@ -241,7 +241,7 @@ impl Signer {
.infoln(format!("Signing transaction: {}", hex::encode(tx_hash),));
let decorated_signature = match &self.kind {
SignerKind::Local(key) => key.sign_tx_hash(tx_hash)?,
SignerKind::Lab => Lab::sign_tx_env(&tx_env, network, &self.printer)?,
SignerKind::Lab => Lab::sign_tx_env(tx_env, network, &self.printer)?,
};
let mut sigs = signatures.clone().into_vec();
sigs.push(decorated_signature);
Expand Down

0 comments on commit a86af7e

Please sign in to comment.