@@ -93,6 +93,45 @@ describe("multisig", () => {
9393 / F o u n d m u l t i p l e m e m b e r s w i t h t h e s a m e p u b k e y /
9494 ) ;
9595 } ) ;
96+ it ( "error: missing signature from `createKey`" , async ( ) => {
97+ const creator = await generateFundedKeypair ( connection ) ;
98+
99+ const createKey = Keypair . generate ( ) ;
100+ const [ multisigPda ] = multisig . getMultisigPda ( {
101+ createKey : createKey . publicKey ,
102+ } ) ;
103+ const [ configAuthority ] = multisig . getAuthorityPda ( {
104+ multisigPda,
105+ index : 0 ,
106+ } ) ;
107+
108+ const tx = multisig . transactions . multisigCreate ( {
109+ blockhash : ( await connection . getLatestBlockhash ( ) ) . blockhash ,
110+ createKey : createKey . publicKey ,
111+ creator : creator . publicKey ,
112+ multisigPda,
113+ configAuthority,
114+ threshold : 1 ,
115+ members : [
116+ {
117+ key : members . almighty . publicKey ,
118+ permissions : Permissions . all ( ) ,
119+ } ,
120+ {
121+ key : members . almighty . publicKey ,
122+ permissions : Permissions . all ( ) ,
123+ } ,
124+ ] ,
125+ } ) ;
126+
127+ // Missing signature from `createKey`.
128+ tx . sign ( [ creator ] ) ;
129+
130+ await assert . rejects (
131+ ( ) => connection . sendTransaction ( tx , { skipPreflight : true } ) ,
132+ / T r a n s a c t i o n s i g n a t u r e v e r i f i c a t i o n f a i l u r e /
133+ ) ;
134+ } ) ;
96135
97136 it ( "error: empty members" , async ( ) => {
98137 const creator = await generateFundedKeypair ( connection ) ;
0 commit comments