diff --git a/programs/multisig/src/lib.rs b/programs/multisig/src/lib.rs index 2740001..7353ee6 100644 --- a/programs/multisig/src/lib.rs +++ b/programs/multisig/src/lib.rs @@ -87,20 +87,20 @@ pub mod multisig { Ok(()) } + /* + // Sets the owners field on the multisig. The only way this can be invoked + // is via a recursive call from execute_transaction -> set_owners. + pub fn set_owners(ctx: Context, owners: Vec) -> Result<()> { + let multisig = &mut ctx.accounts.multisig; - // Sets the owners field on the multisig. The only way this can be invoked - // is via a recursive call from execute_transaction -> set_owners. - pub fn set_owners(ctx: Context, owners: Vec) -> Result<()> { - let multisig = &mut ctx.accounts.multisig; + if (owners.len() as u64) < multisig.threshold { + multisig.threshold = owners.len() as u64; + } - if (owners.len() as u64) < multisig.threshold { - multisig.threshold = owners.len() as u64; + multisig.owners = owners; + Ok(()) } - - multisig.owners = owners; - Ok(()) - } - + */ // Changes the execution threshold of the multisig. The only way this can be // invoked is via a recursive call from execute_transaction -> // change_threshold. diff --git a/tests/multisig.js b/tests/multisig.js index 4001f8d..72fc035 100644 --- a/tests/multisig.js +++ b/tests/multisig.js @@ -57,7 +57,7 @@ describe("multisig", () => { isWritable: false, isSigner: true, }, - ]; + ];/* const newOwners = [ownerA.publicKey, ownerB.publicKey, ownerD.publicKey]; const data = program.coder.instruction.encode('set_owners', { owners: newOwners, @@ -128,6 +128,6 @@ describe("multisig", () => { assert.equal(multisigAccount.nonce, nonce); assert.ok(multisigAccount.threshold.eq(new anchor.BN(2))); - assert.deepEqual(multisigAccount.owners, newOwners); + assert.deepEqual(multisigAccount.owners, newOwners);*/ }); });