Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TropicalDog17 committed Dec 1, 2023
1 parent 53f9eab commit 2666cee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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),
};
Expand Down

0 comments on commit 2666cee

Please sign in to comment.