Skip to content

Commit

Permalink
follow clippy advice
Browse files Browse the repository at this point in the history
  • Loading branch information
sotnikov-s committed May 29, 2024
1 parent 818d68e commit 7582455
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/usdc-converter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pub fn receive_cw20(
}
}

#[allow(clippy::too_many_arguments)]
fn execute_convert_and_stake(
deps: DepsMut,
env: Env,
Expand Down Expand Up @@ -215,6 +216,7 @@ fn handle_callback(
}
}

#[allow(clippy::too_many_arguments)]
fn handle_swap_callback(
deps: DepsMut,
env: Env,
Expand Down Expand Up @@ -248,17 +250,15 @@ fn handle_swap_callback(
.querier
.query_balance(env.contract.address.to_string(), NTRN_DENOM.to_string())?
.amount
.checked_sub(ntrn_prev_balance)?
.into();
.checked_sub(ntrn_prev_balance)?;
let axl_usdc_withdrawn: Uint128 = deps
.querier
.query_balance(
env.contract.address.to_string(),
config.axl_usdc_denom.clone(),
)?
.amount
.checked_sub(axl_usdc_prev_balance)?
.into();
.checked_sub(axl_usdc_prev_balance)?;
let noble_usdc_balance: Uint128 = deps
.querier
.query_balance(env.contract.address.to_string(), noble_usdc_denom.clone())?
Expand Down Expand Up @@ -307,6 +307,7 @@ fn handle_swap_callback(
.add_attribute("axl_usdc_withdrawn", axl_usdc_withdrawn))
}

#[allow(clippy::too_many_arguments)]
fn handle_stake_callback(
deps: DepsMut,
env: Env,
Expand All @@ -328,8 +329,7 @@ fn handle_stake_callback(
.querier
.query_balance(env.contract.address.to_string(), noble_usdc_denom.clone())?
.amount
.checked_sub(noble_usdc_prev_balance)?
.into();
.checked_sub(noble_usdc_prev_balance)?;

Ok(Response::new()
.add_message(CosmosMsg::Wasm(WasmMsg::Execute {
Expand Down

0 comments on commit 7582455

Please sign in to comment.