Skip to content

Commit 12f0280

Browse files
Disable set_owners to test upgrade
1 parent 1fea0ca commit 12f0280

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

programs/multisig/src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,20 @@ pub mod multisig {
8787

8888
Ok(())
8989
}
90+
/*
91+
// Sets the owners field on the multisig. The only way this can be invoked
92+
// is via a recursive call from execute_transaction -> set_owners.
93+
pub fn set_owners(ctx: Context<Auth>, owners: Vec<Pubkey>) -> Result<()> {
94+
let multisig = &mut ctx.accounts.multisig;
9095
91-
// Sets the owners field on the multisig. The only way this can be invoked
92-
// is via a recursive call from execute_transaction -> set_owners.
93-
pub fn set_owners(ctx: Context<Auth>, owners: Vec<Pubkey>) -> Result<()> {
94-
let multisig = &mut ctx.accounts.multisig;
96+
if (owners.len() as u64) < multisig.threshold {
97+
multisig.threshold = owners.len() as u64;
98+
}
9599
96-
if (owners.len() as u64) < multisig.threshold {
97-
multisig.threshold = owners.len() as u64;
100+
multisig.owners = owners;
101+
Ok(())
98102
}
99-
100-
multisig.owners = owners;
101-
Ok(())
102-
}
103-
103+
*/
104104
// Changes the execution threshold of the multisig. The only way this can be
105105
// invoked is via a recursive call from execute_transaction ->
106106
// change_threshold.

tests/multisig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe("multisig", () => {
5757
isWritable: false,
5858
isSigner: true,
5959
},
60-
];
60+
];/*
6161
const newOwners = [ownerA.publicKey, ownerB.publicKey, ownerD.publicKey];
6262
const data = program.coder.instruction.encode('set_owners', {
6363
owners: newOwners,
@@ -128,6 +128,6 @@ describe("multisig", () => {
128128
129129
assert.equal(multisigAccount.nonce, nonce);
130130
assert.ok(multisigAccount.threshold.eq(new anchor.BN(2)));
131-
assert.deepEqual(multisigAccount.owners, newOwners);
131+
assert.deepEqual(multisigAccount.owners, newOwners);*/
132132
});
133133
});

0 commit comments

Comments
 (0)