anchor.diff:  
   % functions with data access
   get_credential_list(UserId) ->
  +    {ok, List} = get_credential_states(UserId),
  +    CredList = [ ServiceId || {ServiceId, _CredState} <- List ], 
  +    {ok, CredList}.
  +
  +get_credential_states(UserId) ->
       case tts_data:credential_get(UserId) of
           {error, _ } -> 
               {ok, []};
           {ok, List} ->
  -            CredList = [ ServiceId || {ServiceId, _CredState} <- List ], 
  -            {ok, CredList}
  +            {ok, List}
       end.
  +
  +
   
   get_credential_state(UserId,ServiceId) ->
       case tts_data:credential_get(UserId) of
  
positive.code:          get_list/1,
           request/4,
           revoke/2,
           security_incident/2
          ]).
  
  
negative.code:     ok = remove_credential(UserId,ServiceId,CredState),     
      {ok, Result};
  handle_revoke_result({error,_},_ServiceId,_UserInfo,_CredState) ->
      ok.
  
  handle_incident_result({ok,#{result := Result}},ServiceId, #{uid := UserId}, CredState) ->
      ok = remove_credential(UserId,ServiceId,CredState),     
      {ok, Result};
  handle_incident_result({error,_},_ServiceId,_UserInfo,_CredState) ->
      ok.
  
  store_credential_if_valid(_,_,#{error := _}) ->
  