File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
programs/compressed-token/program/src/mint_action/actions Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub fn process_mint_to_ctoken_action(
2121 validated_accounts : & MintActionAccounts ,
2222 packed_accounts : & ProgramPackedAccounts < ' _ , AccountInfo > ,
2323 mint : Pubkey ,
24- ) -> Result < Option < ( u8 , u64 ) > , ProgramError > {
24+ ) -> Result < Option < u64 > , ProgramError > {
2525 check_authority (
2626 compressed_mint. base . mint_authority ,
2727 validated_accounts. authority . key ( ) ,
@@ -56,10 +56,7 @@ pub fn process_mint_to_ctoken_action(
5656 ) ;
5757
5858 // Capture top-up lamport amount if compressible extension present
59- let transfer_amount = compress_or_decompress_ctokens ( inputs) ?;
60-
61- // Return account index and amount if there's a transfer needed
62- Ok ( transfer_amount. map ( |amount| ( action. account_index , amount) ) )
59+ compress_or_decompress_ctokens ( inputs)
6360}
6461
6562#[ profile]
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ pub fn process_actions<'a>(
9191 // compressed_mint.metadata.spl_mint_initialized = true;
9292 }
9393 ZAction :: MintToCToken ( mint_to_ctoken_action) => {
94- let transfer = process_mint_to_ctoken_action (
94+ let transfer_amount = process_mint_to_ctoken_action (
9595 mint_to_ctoken_action,
9696 compressed_mint,
9797 validated_accounts,
@@ -100,7 +100,8 @@ pub fn process_actions<'a>(
100100 ) ?;
101101
102102 // Accumulate transfer amount if present (deduplication happens here)
103- if let Some ( ( account_index, amount) ) = transfer {
103+ if let Some ( amount) = transfer_amount {
104+ let account_index = mint_to_ctoken_action. account_index ;
104105 if account_index as usize >= 40 {
105106 msg ! (
106107 "Too many compression transfers: {}, max 40 allowed" ,
You can’t perform that action at this time.
0 commit comments