diff --git a/web3_proxy/src/frontend/users/mod.rs b/web3_proxy/src/frontend/users/mod.rs index c5a4fa64..decf1915 100644 --- a/web3_proxy/src/frontend/users/mod.rs +++ b/web3_proxy/src/frontend/users/mod.rs @@ -15,9 +15,7 @@ use axum::{ Extension, Json, TypedHeader, }; use axum_macros::debug_handler; -use check_if_email_exists::{ - check_email, CheckEmailInput, CheckEmailInputProxy, CheckEmailOutput, Reachable, -}; +use check_if_email_exists::{check_email, CheckEmailInput, Reachable}; use entities; use entities::user; use migration::sea_orm::{self, ActiveModelTrait}; @@ -66,17 +64,12 @@ pub async fn user_post( let check_email_input = CheckEmailInput::new(x.clone()); // Verify this input, using async/await syntax. let result = check_email(&check_email_input).await; - match result.is_reachable { - Reachable::Invalid => { - return Err(Web3ProxyError::BadRequest( - "The e-mail address you provided seems invalid".into(), - )); - } - // Let's be very chill about the validity of e-mails, and only error if the Syntax / SMPT / MX does not work - // Reachable::Safe => {} - // Reachable::Unknown => {} - // Reachable::Risky => {} - _ => {} + + // Let's be very chill about the validity of e-mails, and only error if the Syntax / SMPT / MX does not work + if let Reachable::Invalid = result.is_reachable { + return Err(Web3ProxyError::BadRequest( + "The e-mail address you provided seems invalid".into(), + )); } // TODO: do some basic validation diff --git a/web3_proxy/src/frontend/users/payment.rs b/web3_proxy/src/frontend/users/payment.rs index cd5a9a33..2378f44c 100644 --- a/web3_proxy/src/frontend/users/payment.rs +++ b/web3_proxy/src/frontend/users/payment.rs @@ -12,9 +12,8 @@ use axum::{ use axum_client_ip::InsecureClientIp; use axum_macros::debug_handler; use entities::{balance, increase_on_chain_balance_receipt, rpc_key, user}; -use ethbloom::Input as BloomInput; use ethers::abi::AbiEncode; -use ethers::types::{Address, TransactionReceipt, ValueOrArray, H256}; +use ethers::types::{Address, TransactionReceipt, H256}; use hashbrown::HashMap; use http::StatusCode; use log::{debug, info, trace}; diff --git a/web3_proxy/src/frontend/users/rpc_keys.rs b/web3_proxy/src/frontend/users/rpc_keys.rs index 217f7fb1..b22b97db 100644 --- a/web3_proxy/src/frontend/users/rpc_keys.rs +++ b/web3_proxy/src/frontend/users/rpc_keys.rs @@ -19,7 +19,6 @@ use itertools::Itertools; use migration::sea_orm::{ self, ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter, TryIntoModel, }; -use migration::LockType; use serde::Deserialize; use serde_json::json; use std::sync::Arc; diff --git a/web3_proxy/src/frontend/users/subuser.rs b/web3_proxy/src/frontend/users/subuser.rs index ec1e8d4f..9adfeb94 100644 --- a/web3_proxy/src/frontend/users/subuser.rs +++ b/web3_proxy/src/frontend/users/subuser.rs @@ -26,7 +26,6 @@ use migration::sea_orm::TransactionTrait; use serde_json::json; use std::sync::Arc; use ulid::{self, Ulid}; -use uuid::Uuid; pub async fn get_keys_as_subuser( Extension(app): Extension>,