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

Use keyRef if supplied to pick signing key in `createVerifiablePres… #1202

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

jasny
Copy link
Contributor

@jasny jasny commented Jul 20, 2023

What issue is this PR fixing

https://github.com/uport-project/veramo/blob/6981e6845d6f90d7b0c8dd6e0117b73dfd8edfb9/packages/credential-w3c/src/action-handler.ts#L240-L242

keyRef is an arg property for createVerifiablePresentation and createVerifiableCredential. It should be used to pick which key is used for signing. However, it's being ignored.

What is being changed

If keyRef is supplied, it's used to select a specific key of the identifier. If it's not supplied, the uses the first key (current behavior).

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests.
  • I did not add automated tests because _________, and I am aware that a PR without tests will likely get rejected.

@jasny jasny marked this pull request as draft July 20, 2023 18:56
Use `keyRef` if supplied to pick signing key in `createVerifiablePresentation` and `createVerifiableCredential`
@jasny jasny marked this pull request as ready for review July 20, 2023 19:51
Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, kudos for updating the tests!

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (6981e68) 84.48% compared to head (178df94) 84.49%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1202   +/-   ##
=======================================
  Coverage   84.48%   84.49%           
=======================================
  Files         158      158           
  Lines       16625    16635   +10     
  Branches     1823     1826    +3     
=======================================
+ Hits        14046    14056   +10     
  Misses       2579     2579           
Impacted Files Coverage Δ
packages/credential-w3c/src/action-handler.ts 81.90% <100.00%> (+0.35%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mirceanis mirceanis merged commit 70d49f4 into decentralized-identity:next Jul 24, 2023
11 checks passed
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.

None yet

2 participants