Skip to content

Commit

Permalink
fix(ms-settings): removed duplicate ms account
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmedia committed Jan 30, 2023
1 parent 0fa2c49 commit ff11b26
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions programs/squads-mpl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ pub mod squads_mpl {
// deprecated! constraint has been removed in favor of the roles program
// instruction to change the external execute setting, which allows
// 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;
pub fn set_external_execute(ctx: Context<MsAuth>, _setting: bool) -> Result<()> {
// let ms = &mut ctx.accounts.multisig;
// ms.allow_external_execute = setting; // no op
Ok(())
}
Expand Down Expand Up @@ -876,32 +876,30 @@ pub struct ExecuteInstruction<'info> {

#[derive(Accounts)]
pub struct MsAuth<'info> {
#[account(mut)]
multisig: Box<Account<'info, Ms>>,
#[account(
mut,
seeds = [
b"squad",
multisig.create_key.as_ref(),
b"multisig"
], bump = multisig.bump
], bump = multisig.bump,
signer
)]
pub multisig_auth: Signer<'info>,
pub multisig: Box<Account<'info, Ms>>,
}

#[derive(Accounts)]
pub struct MsAuthRealloc<'info> {
#[account(mut)]
multisig: Box<Account<'info, Ms>>,
#[account(
mut,
seeds = [
b"squad",
multisig.create_key.as_ref(),
b"multisig"
], bump = multisig.bump
], bump = multisig.bump,
signer
)]
pub multisig_auth: Signer<'info>,
pub multisig: Box<Account<'info, Ms>>,
// needs to sign as well to transfer lamports if needed
#[account(mut)]
pub member: Signer<'info>,
Expand Down

0 comments on commit ff11b26

Please sign in to comment.