fn valid_delegate(
            identity: &T::AccountId,
            delegate_type: &[u8],
            delegate: &T::AccountId
        ) -> DispatchResult { 
            ensure!(delegate_type.len() <= 64, Error::<T>::InvalidDelegate);
            ensure!(
                Self::valid_listed_delegate(identity, delegate_type, delegate).is_ok() ||
                Self::is_owner(identity, delegate).is_ok(), Error::<T>::InvalidDelegate
            );
            Ok(())
        }
//  Validates if a delegate belongs to an identity and it has not expired 
Validates if a delegate belongs to an identity and it has not expired
Validates if a delegate belongs to an identity and it has not expired
fn valid_delegate(
            identity: &T::AccountId,
            delegate_type: &[u8],
            delegate: &T::AccountId
        ) -> DispatchResult { 
            ensure!(delegate_type.len() <= 64, Error::<T>::InvalidDelegate);
            ensure!(
                Self::valid_listed_delegate(identity, delegate_type, delegate).is_ok() ||
                Self::is_owner(identity, delegate).is_ok(), Error::<T>::InvalidDelegate
            );
            Ok(())
        }
fn valid_delegate ( identity : & T :: AccountId , delegate_type : & [ u8 ] , delegate : & T :: AccountId ) -> DispatchResult { ensure ! ( delegate_type len ( ) 64 Error T InvalidDelegate ) ; ensure ! ( Self valid_listed_delegate ( identity delegate_type delegate ) is_ok ( ) Self is_owner ( identity delegate ) is_ok ( ) Error T InvalidDelegate ) ; Ok ( ( ) ) }
Validates if a delegate belongs to an identity and it has not expired
Validates if a delegate belongs to an identity and it has not expired
identity
&T::AccountId
delegate_type
&[u8]
delegate
&T::AccountId
identity
&T::AccountId
delegate_type
&[u8]
delegate
&T::AccountId