diff --git a/src/contract.rs b/src/contract.rs index 459b756..6ff1ac9 100644 --- a/src/contract.rs +++ b/src/contract.rs @@ -116,16 +116,16 @@ pub mod execute { let offer_asset = coin.denom.clone(); let amount: u128 = if offer_asset != pair_info.0 && offer_asset != pair_info.1 { return Err(ContractError::Payment( - cw_utils::PaymentError::MissingDenom(coin.denom.to_string()), + cw_utils::PaymentError::MissingDenom(coin.denom), )); } else { coin.amount.into() }; let asked_asset = if pair_info.0 == offer_asset { - pair_info.1.clone() + pair_info.1 } else { - pair_info.0.clone() + pair_info.0 }; let swap_astro_msg = pair::ExecuteMsg::Swap { @@ -181,7 +181,7 @@ pub mod execute { }; let amount: u128 = if !offer.equal(&asset_infos[0]) && !offer.equal(&asset_infos[1]) { return Err(ContractError::Payment( - cw_utils::PaymentError::MissingDenom(coin.denom.to_string()), + cw_utils::PaymentError::MissingDenom(coin.denom), )); } else { coin.amount.into() @@ -212,7 +212,7 @@ pub mod execute { to: Some(info.sender.to_string()), }; let exec_cw20_mint_msg = WasmMsg::Execute { - contract_addr: pool_address.clone().to_string(), + contract_addr: pool_address.to_string(), msg: to_json_binary(&swap_astro_msg)?, funds: coins(amount - fee, &offer_asset), };