@@ -40,9 +40,8 @@ fn batch_instruction(instructions: Vec<Instruction>) -> Result<Instruction, Prog
4040 } )
4141}
4242
43- #[ test_case:: test_case( TOKEN_PROGRAM_ID ; "p-token" ) ]
4443#[ tokio:: test]
45- async fn batch ( token_program : Pubkey ) {
44+ async fn batch ( ) {
4645 let context = ProgramTest :: new ( "pinocchio_token_program" , TOKEN_PROGRAM_ID , None )
4746 . start_with_context ( )
4847 . await ;
@@ -63,10 +62,10 @@ async fn batch(token_program: Pubkey) {
6362 & mint_a. pubkey ( ) ,
6463 mint_rent,
6564 mint_len as u64 ,
66- & token_program ,
65+ & TOKEN_PROGRAM_ID ,
6766 ) ;
6867 let initialize_mint_ix = spl_token:: instruction:: initialize_mint (
69- & token_program ,
68+ & TOKEN_PROGRAM_ID ,
7069 & mint_a. pubkey ( ) ,
7170 & mint_authority. pubkey ( ) ,
7271 None ,
@@ -82,10 +81,10 @@ async fn batch(token_program: Pubkey) {
8281 & mint_b. pubkey ( ) ,
8382 mint_rent,
8483 mint_len as u64 ,
85- & token_program ,
84+ & TOKEN_PROGRAM_ID ,
8685 ) ;
8786 let initialize_mint_with_freeze_authority_ix = spl_token:: instruction:: initialize_mint2 (
88- & token_program ,
87+ & TOKEN_PROGRAM_ID ,
8988 & mint_b. pubkey ( ) ,
9089 & mint_authority. pubkey ( ) ,
9190 Some ( & freeze_authority) ,
@@ -104,24 +103,24 @@ async fn batch(token_program: Pubkey) {
104103 & owner_a_ta_a. pubkey ( ) ,
105104 account_rent,
106105 account_len as u64 ,
107- & token_program ,
106+ & TOKEN_PROGRAM_ID ,
108107 ) ;
109108 let create_owner_b_ta_a = system_instruction:: create_account (
110109 & context. payer . pubkey ( ) ,
111110 & owner_b_ta_a. pubkey ( ) ,
112111 account_rent,
113112 account_len as u64 ,
114- & token_program ,
113+ & TOKEN_PROGRAM_ID ,
115114 ) ;
116115 let intialize_owner_a_ta_a = spl_token:: instruction:: initialize_account3 (
117- & token_program ,
116+ & TOKEN_PROGRAM_ID ,
118117 & owner_a_ta_a. pubkey ( ) ,
119118 & mint_a. pubkey ( ) ,
120119 & owner_a. pubkey ( ) ,
121120 )
122121 . unwrap ( ) ;
123122 let intialize_owner_b_ta_a = spl_token:: instruction:: initialize_account3 (
124- & token_program ,
123+ & TOKEN_PROGRAM_ID ,
125124 & owner_b_ta_a. pubkey ( ) ,
126125 & mint_a. pubkey ( ) ,
127126 & owner_b. pubkey ( ) ,
@@ -130,7 +129,7 @@ async fn batch(token_program: Pubkey) {
130129
131130 // Mint Token A to Owner A
132131 let mint_token_a_to_owner_a = spl_token:: instruction:: mint_to (
133- & token_program ,
132+ & TOKEN_PROGRAM_ID ,
134133 & mint_a. pubkey ( ) ,
135134 & owner_a_ta_a. pubkey ( ) ,
136135 & mint_authority. pubkey ( ) ,
@@ -141,7 +140,7 @@ async fn batch(token_program: Pubkey) {
141140
142141 // Transfer Token A from Owner A to Owner B
143142 let transfer_token_a_to_owner_b = spl_token:: instruction:: transfer (
144- & token_program ,
143+ & TOKEN_PROGRAM_ID ,
145144 & owner_a_ta_a. pubkey ( ) ,
146145 & owner_b_ta_a. pubkey ( ) ,
147146 & owner_a. pubkey ( ) ,
@@ -152,7 +151,7 @@ async fn batch(token_program: Pubkey) {
152151
153152 // Close Token A
154153 let close_owner_a_ta_a = spl_token:: instruction:: close_account (
155- & token_program ,
154+ & TOKEN_PROGRAM_ID ,
156155 & owner_a_ta_a. pubkey ( ) ,
157156 & owner_a. pubkey ( ) ,
158157 & owner_a. pubkey ( ) ,
0 commit comments