From 00d916f72828a6b350cd7be18636d156882a7579 Mon Sep 17 00:00:00 2001 From: hu55a1n1 Date: Thu, 3 Oct 2024 15:26:53 +0200 Subject: [PATCH] clippy fixes --- crates/cli/src/handler/enclave_start.rs | 2 +- crates/utils/cw-client/src/grpc.rs | 6 +++--- examples/transfers/enclave/src/wslistener.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/handler/enclave_start.rs b/crates/cli/src/handler/enclave_start.rs index 130a2caa..3a1e365c 100644 --- a/crates/cli/src/handler/enclave_start.rs +++ b/crates/cli/src/handler/enclave_start.rs @@ -221,7 +221,7 @@ async fn gramine_manifest( .arg("-Dra_type=dcap") .arg(format!("-Dra_client_spid={}", ra_client_spid)) .arg("-Dra_client_linkable=1") - .arg(format!("-Dchain_id={}", chain_id.to_string())) + .arg(format!("-Dchain_id={}", chain_id)) .arg(format!("-Dquartz_dir={}", quartz_dir.display())) .arg(format!("-Dtrusted_height={}", trusted_height)) .arg(format!("-Dtrusted_hash={}", trusted_hash)) diff --git a/crates/utils/cw-client/src/grpc.rs b/crates/utils/cw-client/src/grpc.rs index 2c2d6b2b..be93edec 100644 --- a/crates/utils/cw-client/src/grpc.rs +++ b/crates/utils/cw-client/src/grpc.rs @@ -129,7 +129,7 @@ impl CwClient for GrpcClient { msgs, account.sequence, account.account_number, - &chain_id, + chain_id, ) .map_err(|e| anyhow!("failed to create msg/tx: {}", e))?; @@ -194,10 +194,10 @@ pub fn tx_bytes( chain_id: &TmChainId, ) -> Result, Box> { let tx_body = tx::Body::new(msgs, "", 0u16); - let signer_info = SignerInfo::single_direct(Some(tm_pubkey.into()), sequence_number); + let signer_info = SignerInfo::single_direct(Some(tm_pubkey), sequence_number); let auth_info = signer_info.auth_info(Fee::from_amount_and_gas(amount, gas)); let sign_doc = SignDoc::new(&tx_body, &auth_info, chain_id, account_number)?; - let tx_signed = sign_doc.sign(&secret)?; + let tx_signed = sign_doc.sign(secret)?; Ok(tx_signed.to_bytes()?) } diff --git a/examples/transfers/enclave/src/wslistener.rs b/examples/transfers/enclave/src/wslistener.rs index ec1e7dda..78d097ee 100644 --- a/examples/transfers/enclave/src/wslistener.rs +++ b/examples/transfers/enclave/src/wslistener.rs @@ -160,7 +160,7 @@ fn extract_event_info( Ok((contract_address, ephemeral_pubkey, sender)) } -async fn transfer_handler( +async fn transfer_handler( client: &TransfersService, contract: &AccountId, ws_config: &WsListenerConfig,