From 500b71b6e9ff369a112d285b842e18ab78afc1ff Mon Sep 17 00:00:00 2001 From: Max Kalashnikoff Date: Tue, 12 Nov 2024 16:23:14 +0100 Subject: [PATCH] feat: removing the native balance zero check --- src/handlers/chain_agnostic/route.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/handlers/chain_agnostic/route.rs b/src/handlers/chain_agnostic/route.rs index 702b8316..d4bf5adc 100644 --- a/src/handlers/chain_agnostic/route.rs +++ b/src/handlers/chain_agnostic/route.rs @@ -11,7 +11,7 @@ use { storage::irn::OperationType, utils::crypto::{ convert_alloy_address_to_h160, decode_erc20_function_type, decode_erc20_transfer_data, - get_balance, get_erc20_balance, get_gas_price, get_nonce, Erc20FunctionType, + get_erc20_balance, get_gas_price, get_nonce, Erc20FunctionType, }, }, alloy::primitives::{Address, U256}, @@ -203,21 +203,6 @@ async fn handler_internal( return Ok(NO_BRIDING_NEEDED_RESPONSE.into_response()); } - // Check the native token balance for the bridging chainId for gas fees paying - let native_token_balance = get_balance( - &bridge_chain_id, - convert_alloy_address_to_h160(from_address), - &query_params.project_id.clone(), - MessageSource::ChainAgnosticCheck, - ) - .await?; - if U256::from_be_bytes(native_token_balance.into()) == U256::ZERO { - return Ok(Json(ErrorResponse { - error: BridgingError::InsufficientGasFunds, - }) - .into_response()); - } - // Get Quotes for the bridging let quotes = state .providers