diff --git a/token/program-2022-test/tests/program_test.rs b/token/program-2022-test/tests/program_test.rs index 1400285a0c0..a3f68c612fb 100644 --- a/token/program-2022-test/tests/program_test.rs +++ b/token/program-2022-test/tests/program_test.rs @@ -77,6 +77,22 @@ impl TestContext { mint_account: Keypair, extension_init_params: Vec, freeze_authority: Option, + ) -> TokenResult<()> { + self.init_token_with_mint_keypair_and_freeze_authority_and_additional_signers( + mint_account, + extension_init_params, + freeze_authority, + &[], + ) + .await + } + + pub async fn init_token_with_mint_keypair_and_freeze_authority_and_additional_signers( + &mut self, + mint_account: Keypair, + extension_init_params: Vec, + freeze_authority: Option, + additional_signers: &[&Keypair], ) -> TokenResult<()> { let payer = keypair_clone(&self.context.lock().await.payer); let client: Arc> = @@ -109,12 +125,15 @@ impl TestContext { Arc::new(payer), ); + let mut signing_keypairs = vec![&mint_account]; + signing_keypairs.extend_from_slice(additional_signers); + token .create_mint( &mint_authority_pubkey, freeze_authority_pubkey.as_ref(), extension_init_params, - &[&mint_account], + &signing_keypairs, ) .await?;