Skip to content

Commit

Permalink
Replace unnecessary DepsMut with Deps
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Aug 26, 2024
1 parent 2806902 commit 02aa288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct DepositInfo {
}

pub fn get_depositable_tokens(
deps: &DepsMut,
deps: &Deps,
funds: Vec<Coin>,
pool_config: &PoolConfig,
) -> Result<DepositInfo, ContractError> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) fn execute_exact_deposit(
let pool_config = POOL_CONFIG.load(deps.storage)?;
assert_deposits(&info.funds, &pool_config)?;
let recipient = recipient.map_or(Ok(info.sender.clone()), |x| deps.api.addr_validate(&x))?;
let deposit_info = get_depositable_tokens(&deps, info.funds, &pool_config)?;
let deposit_info = get_depositable_tokens(&deps.as_ref(), info.funds, &pool_config)?;

execute_deposit(&mut deps, env, recipient, deposit_info)
}
Expand All @@ -55,7 +55,7 @@ pub(crate) fn execute_any_deposit(
.position
.ok_or(ContractError::MissingPosition {})?;

let deposit_info = get_depositable_tokens(&deps.branch(), info.funds, &pool_config)?;
let deposit_info = get_depositable_tokens(&deps.as_ref(), info.funds, &pool_config)?;
if deposit_info.base_refund.amount.is_zero() && deposit_info.quote_refund.amount.is_zero() {
return execute_deposit(&mut deps, env, recipient, deposit_info);
}
Expand Down

0 comments on commit 02aa288

Please sign in to comment.