@@ -263,25 +263,9 @@ impl DocumentFactoryV0 {
263263                    nonce_counter, 
264264                    platform_version, 
265265                ) , 
266-                 DocumentTransitionActionType :: Transfer  => Self :: document_transfer_transitions ( 
267-                     documents
268-                         . into_iter ( ) 
269-                         . map ( |( document,  document_type,  _) | ( document,  document_type) ) 
270-                         . collect ( ) , 
271-                     nonce_counter, 
272-                     platform_version, 
273-                 ) , 
274-                 DocumentTransitionActionType :: Purchase  => { 
275-                     Err ( ProtocolError :: InvalidStateTransitionType ( 
276-                         "action type not accounted for Transfer" . to_string ( ) , 
277-                     ) ) 
278-                 } 
279-                 DocumentTransitionActionType :: UpdatePrice  => Err ( ProtocolError :: InvalidStateTransitionType ( 
280-                     "action type not accounted for UpdatePrice" . to_string ( ) , 
266+                 _ => Err ( ProtocolError :: InvalidStateTransitionType ( 
267+                     "action type not accounted for" . to_string ( ) , 
281268                ) ) , 
282-                 DocumentTransitionActionType :: IgnoreWhileBumpingRevision  => Err ( ProtocolError :: InvalidStateTransitionType ( 
283-                     "action type not accounted for IgnoreWhileBumpingRevision" . to_string ( ) , 
284-                 ) ) 
285269            } ) 
286270            . collect :: < Result < Vec < _ > ,  ProtocolError > > ( ) ?
287271            . into_iter ( ) 
@@ -524,93 +508,6 @@ impl DocumentFactoryV0 {
524508        // Ok(raw_transitions) 
525509    } 
526510
527-     #[ cfg( feature = "state-transitions" ) ]  
528-     fn  document_transfer_transitions ( 
529-         documents :  Vec < ( Document ,  DocumentTypeRef ) > , 
530-         nonce_counter :  & mut  BTreeMap < ( Identifier ,  Identifier ) ,  u64 > ,  //IdentityID/ContractID -> nonce 
531-         platform_version :  & PlatformVersion , 
532-     )  -> Result < Vec < DocumentTransition > ,  ProtocolError >  { 
533-         documents
534-             . into_iter ( ) 
535-             . map ( |( mut  document,  document_type) | { 
536-                 if  !document_type. documents_mutable ( )  { 
537-                     return  Err ( DocumentError :: TryingToReplaceImmutableDocument  { 
538-                         document :  Box :: new ( document) , 
539-                     } 
540-                     . into ( ) ) ; 
541-                 } 
542-                 if  document. revision ( ) . is_none ( )  { 
543-                     return  Err ( DocumentError :: RevisionAbsentError  { 
544-                         document :  Box :: new ( document) , 
545-                     } 
546-                     . into ( ) ) ; 
547-                 } ; 
548- 
549-                 document. increment_revision ( ) ?; 
550-                 document. set_updated_at ( Some ( Utc :: now ( ) . timestamp_millis ( )  as  TimestampMillis ) ) ; 
551- 
552-                 let  recipient_owner_id = document. owner_id ( ) ; 
553- 
554-                 let  nonce = nonce_counter
555-                     . entry ( ( document. owner_id ( ) ,  document_type. data_contract_id ( ) ) ) 
556-                     . or_default ( ) ; 
557- 
558-                 let  transition = DocumentTransferTransition :: from_document ( 
559-                     document, 
560-                     document_type, 
561-                     * nonce, 
562-                     recipient_owner_id, 
563-                     platform_version, 
564-                     None , 
565-                     None , 
566-                 ) ?; 
567- 
568-                 * nonce += 1 ; 
569- 
570-                 Ok ( transition. into ( ) ) 
571-             } ) 
572-             . collect ( ) 
573-         // let mut raw_transitions = vec![]; 
574-         // for (document, document_type) in documents { 
575-         //     if !document_type.documents_mutable() { 
576-         //         return Err(DocumentError::TryingToReplaceImmutableDocument { 
577-         //             document: Box::new(document), 
578-         //         } 
579-         //         .into()); 
580-         //     } 
581-         //     let Some(document_revision) = document.revision() else { 
582-         //         return Err(DocumentError::RevisionAbsentError { 
583-         //             document: Box::new(document), 
584-         //         }.into()); 
585-         //     }; 
586-         //     let mut map = document.to_map_value()?; 
587-         // 
588-         //     map.retain(|key, _| { 
589-         //         !key.starts_with('$') || DOCUMENT_REPLACE_KEYS_TO_STAY.contains(&key.as_str()) 
590-         //     }); 
591-         //     map.insert( 
592-         //         PROPERTY_ACTION.to_string(), 
593-         //         Value::U8(DocumentTransitionActionType::Replace as u8), 
594-         //     ); 
595-         //     let new_revision = document_revision + 1; 
596-         //     map.insert(PROPERTY_REVISION.to_string(), Value::U64(new_revision)); 
597-         // 
598-         //     // If document have an originally set `updatedAt` 
599-         //     // we should update it then 
600-         //     let contains_updated_at = document_type 
601-         //         .required_fields() 
602-         //         .contains(PROPERTY_UPDATED_AT); 
603-         // 
604-         //     if contains_updated_at { 
605-         //         let now = Utc::now().timestamp_millis() as TimestampMillis; 
606-         //         map.insert(PROPERTY_UPDATED_AT.to_string(), Value::U64(now)); 
607-         //     } 
608-         // 
609-         //     raw_transitions.push(map.into()); 
610-         // } 
611-         // Ok(raw_transitions) 
612-     } 
613- 
614511    #[ cfg( feature = "state-transitions" ) ]  
615512    fn  document_delete_transitions ( 
616513        documents :  Vec < ( Document ,  DocumentTypeRef ) > , 
0 commit comments