@@ -5,10 +5,12 @@ use frame_support::pallet_prelude::*;
55use sp_runtime:: sp_std:: vec:: Vec ;
66use frame_support:: sp_io:: hashing:: blake2_256;
77
8- pub type Fields < T > = BoundedVec < ( BoundedVec < u8 , ConstU32 < 100 > > , BoundedVec < u8 , ConstU32 < 100 > > ) , <T as Config >:: MaxFiles > ;
9-
10- //Todo: fix AccountId import
11- //pub type CustodianFields<T> = Option<(RawOrigin<T>, BoundedVec<BoundedVec<u8,ConstU32<100>>, <T as Config>::MaxFiles>)>;
8+ pub type Fields < T > = BoundedVec < ( FieldName , Cid ) , <T as Config >:: MaxFiles > ;
9+ type AccountIdOf < T > = <T as frame_system:: Config >:: AccountId ;
10+ pub type FieldName = BoundedVec < u8 , ConstU32 < 100 > > ;
11+ pub type Cid = BoundedVec < u8 , ConstU32 < 100 > > ;
12+ pub type Cids < Len > = BoundedVec < Cid , Len > ;
13+ pub type CustodianFields < T > = ( AccountIdOf < T > , Cids < <T as Config >:: MaxFiles > ) ;
1214
1315#[ derive( CloneNoBound , Encode , Decode , RuntimeDebugNoBound , Default , TypeInfo , MaxEncodedLen , ) ]
1416#[ scale_info( skip_type_params( T ) ) ]
@@ -148,8 +150,8 @@ impl Default for ApplicationStatus{
148150#[ derive( CloneNoBound , Encode , Decode , Eq , RuntimeDebugNoBound , Default , TypeInfo , MaxEncodedLen ) ]
149151pub struct ApplicationField {
150152 pub display_name : BoundedVec < u8 , ConstU32 < 100 > > ,
151- pub cid : BoundedVec < u8 , ConstU32 < 100 > > ,
152- pub custodian_cid : Option < BoundedVec < u8 , ConstU32 < 100 > > > ,
153+ pub cid : Cid ,
154+ pub custodian_cid : Option < Cid > ,
153155}
154156// Eq macro didnt work (binary operation `==` cannot be applied to type...)
155157impl PartialEq for ApplicationField {
0 commit comments