Skip to content

Commit

Permalink
fix(external-execute): removed constraint from pm, no op
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmedia committed Jan 27, 2023
1 parent 17f5047 commit 3143f02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions programs/program-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub mod program_manager {
pub struct CreateManager<'info> {
#[account(
owner = squads_mpl::ID,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) || multisig.allow_external_execute @MsError::KeyNotInMultisig,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) @MsError::KeyNotInMultisig,
)]
pub multisig: Account<'info, Ms>,

Expand Down Expand Up @@ -131,7 +131,7 @@ pub struct CreateManager<'info> {
pub struct CreateManagedProgram<'info> {
#[account(
owner = squads_mpl::ID,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) || multisig.allow_external_execute @MsError::KeyNotInMultisig,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) @MsError::KeyNotInMultisig,
)]
pub multisig: Account<'info, Ms>,

Expand Down Expand Up @@ -171,7 +171,7 @@ pub struct CreateManagedProgram<'info> {
pub struct CreateProgramUpgrade<'info> {
#[account(
owner = squads_mpl::ID,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) || multisig.allow_external_execute @MsError::KeyNotInMultisig,
constraint = matches!(multisig.is_member(creator.key()), Some(..)) @MsError::KeyNotInMultisig,
)]
pub multisig: Account<'info, Ms>,

Expand Down
2 changes: 1 addition & 1 deletion programs/squads-mpl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub mod squads_mpl {
// non-members or programs to execute a transaction.
pub fn set_external_execute(ctx: Context<MsAuth>, setting: bool) -> Result<()> {
let ms = &mut ctx.accounts.multisig;
ms.allow_external_execute = setting;
// ms.allow_external_execute = setting; // no op
Ok(())
}

Expand Down

0 comments on commit 3143f02

Please sign in to comment.