Skip to content

Commit

Permalink
Disable set_owners to test upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Mar 10, 2021
1 parent 1fea0ca commit 12f0280
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions programs/multisig/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Auth>, owners: Vec<Pubkey>) -> 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<Auth>, owners: Vec<Pubkey>) -> 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.
Expand Down
4 changes: 2 additions & 2 deletions tests/multisig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);*/
});
});

0 comments on commit 12f0280

Please sign in to comment.