@@ -44,11 +44,12 @@ fn test_to_compressed_token_account_metas_compress() {
44
44
let mut system_program_account = TestAccount :: new ( system_program, Pubkey :: default ( ) , 0 ) ;
45
45
46
46
let fee_payer_info = fee_payer_account. get_account_info ( ) ;
47
+ let authority_info = authority_account. get_account_info ( ) ;
47
48
48
49
// Create account infos in the correct order for CpiAccounts
49
50
let account_infos = vec ! [
50
51
light_system_account. get_account_info( ) , // 0: light_system_program
51
- authority_account . get_account_info ( ) , // 1: authority
52
+ authority_info . clone ( ) , // 1: authority
52
53
registered_program_account. get_account_info( ) , // 2: registered_program_pda
53
54
noop_account. get_account_info( ) , // 3: noop_program
54
55
compression_authority_account. get_account_info( ) , // 4: account_compression_authority
@@ -75,7 +76,7 @@ fn test_to_compressed_token_account_metas_compress() {
75
76
// Create CpiAccounts with default config (no optional accounts)
76
77
let config = CpiAccountsConfig :: default ( ) ;
77
78
let cpi_accounts =
78
- CpiAccounts :: new_with_config ( & fee_payer_info, & authority , & account_infos, config) ;
79
+ CpiAccounts :: new_with_config ( & fee_payer_info, & authority_info , & account_infos, config) ;
79
80
80
81
// Test our function
81
82
let result = to_compressed_token_account_metas ( & cpi_accounts) ;
@@ -134,11 +135,12 @@ fn test_to_compressed_token_account_metas_with_optional_accounts() {
134
135
let mut token_program_ctx_account = TestAccount :: new ( token_program, Pubkey :: default ( ) , 0 ) ;
135
136
136
137
let fee_payer_info = fee_payer_account. get_account_info ( ) ;
138
+ let authority_info = authority_account. get_account_info ( ) ;
137
139
138
140
// Create account infos in the correct order for CpiAccounts with all optional accounts
139
141
let account_infos = vec ! [
140
142
light_system_account. get_account_info( ) , // 0: light_system_program
141
- authority_account . get_account_info ( ) , // 1: authority
143
+ authority_info . clone ( ) , // 1: authority
142
144
registered_program_account. get_account_info( ) , // 2: registered_program_pda
143
145
noop_account. get_account_info( ) , // 3: noop_program
144
146
compression_authority_account. get_account_info( ) , // 4: account_compression_authority
@@ -173,7 +175,7 @@ fn test_to_compressed_token_account_metas_with_optional_accounts() {
173
175
decompress : false ,
174
176
} ;
175
177
let cpi_accounts =
176
- CpiAccounts :: new_with_config ( & fee_payer_info, & authority , & account_infos, config) ;
178
+ CpiAccounts :: new_with_config ( & fee_payer_info, & authority_info , & account_infos, config) ;
177
179
178
180
// Test our function
179
181
let result = to_compressed_token_account_metas ( & cpi_accounts) ;
0 commit comments