-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix: normalizeCredential overwrites "evidence" when "vc" is missing #86
fix: normalizeCredential overwrites "evidence" when "vc" is missing #86
Conversation
ef641f1
to
c162a6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution. It looks great!
I think it would be wise to also add the symmetrical operation when transforming from W3C JSON to JWT payload.
Do you think you can add that to this PR as well?
Good observation! I actually fixed the W3C -> JWT transform in PR #78 but didn't fix this direction (JWT -> W3C). Taken together the changes should move |
yes, that's the general idea
For the moment, this should hold true. In a future version, there should not be any ambiguity here. Either an error should be thrown or the existing props overridden. (#64) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have the symmetric transformation included here as well.
Do you think you can add them?
c162a6c
to
4a03bd0
Compare
Hey sorry @mirceanis I think I explained myself poorly (and then forgot to clear it up!). Commit 1284973 inside #78 already implements the fix within Can you double check the test cases in |
I see. My bad for not looking thoroughly enough 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, thank you for the contribution!
## [2.1.8](2.1.7...2.1.8) (2021-11-23) ### Bug Fixes * normalizeCredential overwrite of "evidence" when "vc" is missing ([#86](#86)) ([0039298](0039298))
🎉 This PR is included in version 2.1.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Occurs when calling
normalizeCredential
with an argument of typeVerifiableCredential
(i.e. hascredentialSubject
instead ofvc
).For example
after normalization becomes