File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
auction-server/src/auction/service Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -657,6 +657,11 @@ impl Service {
657
657
. filter_map ( |( _, instruction) | {
658
658
let ix_parsed = TokenInstruction :: unpack ( & instruction. data ) . ok ( ) ;
659
659
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 ) ) {
660
665
Some ( instruction)
661
666
} else {
662
667
None
@@ -710,6 +715,22 @@ impl Service {
710
715
destination,
711
716
owner,
712
717
} ) ;
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
+ }
713
734
}
714
735
}
715
736
Ok ( result)
You can’t perform that action at this time.
0 commit comments