diff --git a/contracts/liquidity/factory/src/execute.rs b/contracts/liquidity/factory/src/execute.rs index 65497e84..0ca04de7 100644 --- a/contracts/liquidity/factory/src/execute.rs +++ b/contracts/liquidity/factory/src/execute.rs @@ -1,5 +1,6 @@ use cosmwasm_std::{ - to_json_binary, CosmosMsg, DepsMut, Env, IbcMsg, IbcTimeout, MessageInfo, Response, Uint128, + ensure, to_json_binary, CosmosMsg, DepsMut, Env, IbcMsg, IbcTimeout, MessageInfo, Response, + Uint128, }; use euclid::{ error::ContractError, @@ -101,6 +102,10 @@ pub fn execute_add_liquidity( liquidity_id: String, timeout: Option, ) -> Result { + ensure!( + !token_1_liquidity.is_zero() && !token_2_liquidity.is_zero(), + ContractError::ZeroAssetAmount {} + ); // Load the state let state = STATE.load(deps.storage)?;