Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proofs): sort credentials based on revocation #1225

Conversation

TimoGlastra
Copy link
Contributor

Sorts credentials returned from getRequestedCredentials baed on the revocation status. It sorted as follows:

  • first revoked = undefined (means non-revocation was not requested, credential is not revocable)
  • then revoked = false (means credentials is not reovoked)
  • then revoked = true (means credential is revoked)

Fixes #1223

Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra requested a review from a team as a code owner January 20, 2023 08:29
@TimoGlastra
Copy link
Contributor Author

@jleach does the order look good to you?

@TimoGlastra TimoGlastra enabled auto-merge (squash) January 20, 2023 19:39
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2023

Codecov Report

Merging #1225 (89299d2) into main (25b2bcf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1225   +/-   ##
=======================================
  Coverage   87.65%   87.66%           
=======================================
  Files         738      739    +1     
  Lines       17606    17619   +13     
  Branches     2988     2992    +4     
=======================================
+ Hits        15432    15445   +13     
  Misses       2167     2167           
  Partials        7        7           
Impacted Files Coverage Δ
...ules/proofs/formats/indy/IndyProofFormatService.ts 86.13% <100.00%> (+0.05%) ⬆️
...oofs/formats/indy/util/sortRequestedCredentials.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@TimoGlastra TimoGlastra merged commit 0f6d231 into openwallet-foundation:main Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AFJ should favour non-revoked credentials for proof requests
3 participants