File tree Expand file tree Collapse file tree
auction-server/src/auction/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -657,6 +657,11 @@ impl Service {
657657 . filter_map ( |( _, instruction) | {
658658 let ix_parsed = TokenInstruction :: unpack ( & instruction. data ) . ok ( ) ;
659659 if matches ! ( ix_parsed, Some ( TokenInstruction :: SyncNative ) ) {
660+ return Some ( instruction) ;
661+ }
662+
663+ let ix_parsed_2022 = Token2022Instruction :: unpack ( & instruction. data ) . ok ( ) ;
664+ if matches ! ( ix_parsed_2022, Some ( Token2022Instruction :: SyncNative ) ) {
660665 Some ( instruction)
661666 } else {
662667 None
@@ -710,6 +715,22 @@ impl Service {
710715 destination,
711716 owner,
712717 } ) ;
718+ } else {
719+ let ix_parsed_2022 = Token2022Instruction :: unpack ( & instruction. data ) . ok ( ) ;
720+ if let Some ( Token2022Instruction :: CloseAccount ) = ix_parsed_2022 {
721+ let accounts = futures:: future:: try_join_all (
722+ ( 0 ..3 ) . map ( |i| self . extract_account ( tx, instruction, i) ) ,
723+ )
724+ . await ?;
725+ let [ account, destination, owner] = array:: from_fn ( |i| accounts[ i] ) ;
726+
727+ result. push ( CloseAccountInstructionData {
728+ index,
729+ account,
730+ destination,
731+ owner,
732+ } ) ;
733+ }
713734 }
714735 }
715736 Ok ( result)
You can’t perform that action at this time.
0 commit comments