diff --git a/mm2src/coins/eth/v2_activation.rs b/mm2src/coins/eth/v2_activation.rs index 278986e24f..6a97cac477 100644 --- a/mm2src/coins/eth/v2_activation.rs +++ b/mm2src/coins/eth/v2_activation.rs @@ -311,8 +311,6 @@ pub enum EthTokenActivationParams { #[derive(Clone, Deserialize)] pub struct Erc20TokenActivationRequest { pub required_confirmations: Option, - // #[serde(default)] - // pub use_walletconnect: Option, } /// Holds ERC-20 token-specific activation parameters when using the task manager for activation. @@ -805,7 +803,6 @@ pub(crate) async fn build_address_and_priv_key_policy( let public_key = compress_public_key(public_key_uncompressed)?; Ok(( EthPrivKeyPolicy::WalletConnect { - address, public_key, public_key_uncompressed, }, diff --git a/mm2src/coins/lp_coins.rs b/mm2src/coins/lp_coins.rs index f0a435a0fb..9c9d631fa3 100644 --- a/mm2src/coins/lp_coins.rs +++ b/mm2src/coins/lp_coins.rs @@ -54,8 +54,7 @@ use crypto::{derive_secp256k1_secret, Bip32Error, Bip44Chain, CryptoCtx, CryptoC Secp256k1ExtendedPublicKey, Secp256k1Secret, WithHwRpcError}; use derive_more::Display; use enum_derives::{EnumFromStringify, EnumFromTrait}; -use ethereum_types::{H160, H256}; -use ethereum_types::{H264, H520}; +use ethereum_types::{H256, H264, H520}; use futures::compat::Future01CompatExt; use futures::lock::{Mutex as AsyncMutex, MutexGuard as AsyncMutexGuard}; use futures::{FutureExt, TryFutureExt}; @@ -2123,7 +2122,7 @@ pub struct WithdrawRequest { memo: Option, /// Tendermint specific field used for manually providing the IBC channel IDs. ibc_source_channel: Option, - /// Currently, this flag is used by ETH/ERC20 coins activated with MetaMask/WalletConnect **only**. + /// Currently, this flag is used by ETH/ERC20 coins activated with MetaMask/WalletConnect(Some wallets e.g Metamask) **only**. #[serde(default)] broadcast: bool, } @@ -3903,7 +3902,6 @@ pub enum PrivKeyPolicy { Metamask(EthMetamaskPolicy), WalletConnect { - address: H160, public_key: H264, public_key_uncompressed: H520, }, diff --git a/mm2src/coins/utxo/utxo_common.rs b/mm2src/coins/utxo/utxo_common.rs index c4b0b5cf92..a0c9662e86 100644 --- a/mm2src/coins/utxo/utxo_common.rs +++ b/mm2src/coins/utxo/utxo_common.rs @@ -4745,10 +4745,10 @@ pub fn derive_htlc_key_pair(coin: &UtxoCoinFields, _swap_unique_data: &[u8]) -> activated_key: activated_key_pair, .. } => activated_key_pair, - PrivKeyPolicy::Trezor => todo!(), + PrivKeyPolicy::Trezor => panic!("`PrivKeyPolicy::Trezor` is not supported for UTXO coins"), #[cfg(target_arch = "wasm32")] PrivKeyPolicy::Metamask(_) => panic!("`PrivKeyPolicy::Metamask` is not supported for UTXO coins"), - PrivKeyPolicy::WalletConnect { .. } => todo!(), + PrivKeyPolicy::WalletConnect { .. } => panic!("`PrivKeyPolicy::WalletConnect` is not supported for UTXO coins"), } } diff --git a/mm2src/mm2_main/src/rpc.rs b/mm2src/mm2_main/src/rpc.rs index 64996cdb44..45b2279c54 100644 --- a/mm2src/mm2_main/src/rpc.rs +++ b/mm2src/mm2_main/src/rpc.rs @@ -48,7 +48,7 @@ mod dispatcher_legacy; #[path = "rpc/lp_commands/lp_commands_legacy.rs"] pub mod lp_commands_legacy; mod rate_limiter; -#[path = "rpc/wc_commands/wc_commands.rs"] pub mod wc_commands; +pub mod wc_commands; /// Lists the RPC method not requiring the "userpass" authentication. /// None is also public to skip auth and display proper error in case of method is missing diff --git a/mm2src/mm2_main/src/rpc/dispatcher/dispatcher.rs b/mm2src/mm2_main/src/rpc/dispatcher/dispatcher.rs index c5e6295523..89a7ffb6a3 100644 --- a/mm2src/mm2_main/src/rpc/dispatcher/dispatcher.rs +++ b/mm2src/mm2_main/src/rpc/dispatcher/dispatcher.rs @@ -226,17 +226,6 @@ async fn dispatcher_v2(request: MmRpcRequest, ctx: MmArc) -> DispatcherResult handle_mmrpc(ctx, request, disconnect_session).await, "wc_set_active_session" => handle_mmrpc(ctx, request, set_active_session).await, "wc_ping_session" => handle_mmrpc(ctx, request, ping_session).await, - #[cfg(not(target_arch = "wasm32"))] - native_only_methods => match native_only_methods { - #[cfg(all(feature = "enable-solana", not(target_os = "ios"), not(target_os = "android")))] - "enable_solana_with_tokens" => { - handle_mmrpc(ctx, request, enable_platform_coin_with_tokens::).await - }, - #[cfg(all(feature = "enable-solana", not(target_os = "ios"), not(target_os = "android")))] - "enable_spl" => handle_mmrpc(ctx, request, enable_token::).await, - _ => MmError::err(DispatcherError::NoSuchMethod), - }, - #[cfg(target_arch = "wasm32")] _ => MmError::err(DispatcherError::NoSuchMethod), } } diff --git a/mm2src/mm2_main/src/rpc/wc_commands/wc_commands.rs b/mm2src/mm2_main/src/rpc/wc_commands/mod.rs similarity index 100% rename from mm2src/mm2_main/src/rpc/wc_commands/wc_commands.rs rename to mm2src/mm2_main/src/rpc/wc_commands/mod.rs