Skip to content

Commit

Permalink
pull factory changes from core repo
Browse files Browse the repository at this point in the history
  • Loading branch information
epanchee committed Feb 16, 2024
1 parent 5ac4b49 commit 405863e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/factory/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ pub fn execute_create_pair(
.load(deps.storage, pair_type.to_string())
.map_err(|_| ContractError::PairConfigNotFound {})?;

let config = CONFIG.load(deps.storage)?;
if pair_config.permissioned && info.sender != config.owner {
return Err(ContractError::Unauthorized {});
}

// Check if pair config is disabled
if pair_config.is_disabled {
return Err(ContractError::PairConfigDisabled {});
Expand Down

0 comments on commit 405863e

Please sign in to comment.