Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsaporiti committed Apr 5, 2024
1 parent 2578d8a commit b72dbbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/core/services/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,10 @@ func (i *identity) UpdateState(ctx context.Context, did w3c.DID) (*domain.Identi
return newState, err
}

// checkClaimsToAdd checks if there are claims to process
// if the len of the claims is 0 or the len is 1 and the claim is the authBJJCredential then return an error
func checkClaimsToAdd(lc []domain.Claim, authCoreClaim string) error {
if len(lc) == 0 || len(lc) == 1 && lc[0].SchemaType == authCoreClaim {
if len(lc) == 0 || (len(lc) == 1 && lc[0].SchemaType == authCoreClaim) {
return ErrNoClaimsFoundToProcess
}
return nil
Expand Down

0 comments on commit b72dbbd

Please sign in to comment.