Skip to content

Commit

Permalink
fix: removed unnecessary validation from splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Dec 27, 2024
1 parent 219c9ba commit 0a35200
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions contracts/finance/andromeda-conditional-splitter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use cosmwasm_std::{
attr, ensure, entry_point, BankMsg, Binary, Coin, CosmosMsg, Deps, DepsMut, Env, MessageInfo,
Reply, Response, StdError, SubMsg, Uint128,
};
use cw_utils::nonpayable;

// version info for migration info
const CONTRACT_NAME: &str = "crates.io:andromeda-conditional-splitter";
Expand Down Expand Up @@ -213,16 +212,7 @@ fn execute_update_thresholds(
ctx: ExecuteContext,
thresholds: Vec<Threshold>,
) -> Result<Response, ContractError> {
let ExecuteContext {
deps, info, env, ..
} = ctx;

nonpayable(&info)?;

ensure!(
ADOContract::default().is_owner_or_operator(deps.storage, info.sender.as_str())?,
ContractError::Unauthorized {}
);
let ExecuteContext { deps, env, .. } = ctx;

let conditional_splitter = CONDITIONAL_SPLITTER.load(deps.storage)?;

Expand All @@ -245,16 +235,7 @@ fn execute_update_thresholds(
}

fn execute_update_lock(ctx: ExecuteContext, lock_time: Expiry) -> Result<Response, ContractError> {
let ExecuteContext {
deps, info, env, ..
} = ctx;

nonpayable(&info)?;

ensure!(
ADOContract::default().is_owner_or_operator(deps.storage, info.sender.as_str())?,
ContractError::Unauthorized {}
);
let ExecuteContext { deps, env, .. } = ctx;

let mut conditional_splitter = CONDITIONAL_SPLITTER.load(deps.storage)?;

Expand Down

0 comments on commit 0a35200

Please sign in to comment.