From c434eb1956f06db3ca2ff9933234941090eb7a71 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Thu, 14 Sep 2023 09:11:55 +0200 Subject: [PATCH] ipc-299: address review --- ipc/cli/src/commands/wallet/balances.rs | 4 ++-- ipc/identity/src/evm/mod.rs | 2 +- ipc/identity/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ipc/cli/src/commands/wallet/balances.rs b/ipc/cli/src/commands/wallet/balances.rs index bb589614..6f797d59 100644 --- a/ipc/cli/src/commands/wallet/balances.rs +++ b/ipc/cli/src/commands/wallet/balances.rs @@ -9,7 +9,7 @@ use fvm_shared::{address::Address, econ::TokenAmount}; use ipc_identity::{EthKeyAddress, EvmKeyStore, WalletType}; use ipc_provider::manager::evm::ethers_address_to_fil_address; use ipc_sdk::subnet_id::SubnetID; -use std::{fmt::Debug, str::FromStr, sync::Arc}; +use std::{fmt::Debug, str::FromStr}; use crate::{get_ipc_provider, CommandLineHandler, GlobalArguments}; @@ -25,7 +25,7 @@ impl CommandLineHandler for WalletBalances { let provider = get_ipc_provider(global)?; let wallet_type = WalletType::from_str(&arguments.wallet_type)?; - let subnet = Arc::new(SubnetID::from_str(&arguments.subnet)?); + let subnet = SubnetID::from_str(&arguments.subnet)?; match wallet_type { WalletType::Evm => { let wallet = provider.evm_wallet(); diff --git a/ipc/identity/src/evm/mod.rs b/ipc/identity/src/evm/mod.rs index 9e9fe9f8..e03b30ef 100644 --- a/ipc/identity/src/evm/mod.rs +++ b/ipc/identity/src/evm/mod.rs @@ -123,7 +123,7 @@ impl From for ethers::types::Address { #[cfg(feature = "with-ethers")] impl ToString for EthKeyAddress { fn to_string(&self) -> String { - if self == &Self::default_key() { + if self == &Self::default() { return String::from("default-key"); } format!("{:?}", self.inner) diff --git a/ipc/identity/src/lib.rs b/ipc/identity/src/lib.rs index 8f78c2d1..aee82c43 100644 --- a/ipc/identity/src/lib.rs +++ b/ipc/identity/src/lib.rs @@ -11,7 +11,7 @@ mod evm; mod fvm; #[cfg(feature = "with-ethers")] -pub use crate::evm::{random_key_info, EthKeyAddress}; +pub use crate::evm::{random_eth_key_info, EthKeyAddress}; pub use crate::evm::{ KeyInfo as EvmKeyInfo, KeyStore as EvmKeyStore, PersistentKeyInfo, PersistentKeyStore, DEFAULT_KEYSTORE_NAME,