File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -87,20 +87,20 @@ pub mod multisig {
87
87
88
88
Ok ( ( ) )
89
89
}
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;
95
90
96
- if (owners.len() as u64) < multisig.threshold {
97
- multisig.threshold = owners.len() as u64;
98
- }
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 ;
99
95
100
- multisig.owners = owners;
101
- Ok(())
96
+ if ( owners . len ( ) as u64 ) < multisig. threshold {
97
+ multisig . threshold = owners . len ( ) as u64 ;
102
98
}
103
- */
99
+
100
+ multisig. owners = owners;
101
+ Ok ( ( ) )
102
+ }
103
+
104
104
// Changes the execution threshold of the multisig. The only way this can be
105
105
// invoked is via a recursive call from execute_transaction ->
106
106
// change_threshold.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ describe("multisig", () => {
57
57
isWritable : false ,
58
58
isSigner : true ,
59
59
} ,
60
- ] ; /*
60
+ ] ;
61
61
const newOwners = [ ownerA . publicKey , ownerB . publicKey , ownerD . publicKey ] ;
62
62
const data = program . coder . instruction . encode ( 'set_owners' , {
63
63
owners : newOwners ,
@@ -128,6 +128,6 @@ describe("multisig", () => {
128
128
129
129
assert . equal ( multisigAccount . nonce , nonce ) ;
130
130
assert . ok ( multisigAccount . threshold . eq ( new anchor . BN ( 2 ) ) ) ;
131
- assert.deepEqual(multisigAccount.owners, newOwners);*/
131
+ assert . deepEqual ( multisigAccount . owners , newOwners ) ;
132
132
} ) ;
133
133
} ) ;
You can’t perform that action at this time.
0 commit comments