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

fix(data-store): match claims by credential hash when deleting credential #1270

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

mirceanis
Copy link
Member

What issue is this PR fixing

fixes #1269

What is being changed

When deleting a credential, the corresponding claims are matched by the credential hash (internally computed) instead of the credential id which is optional.

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.

Details

I included the tests in the localJsonStoreAgent test suite as well to ensure similar behavior.
The @veramo/data-store-json did not manifest the same bug, but I added it to check for regressions.

This is a hotfix that should be release before the next major release

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (eb82bdc) 84.92% compared to head (d4a7f44) 84.92%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1270   +/-   ##
=======================================
  Coverage   84.92%   84.92%           
=======================================
  Files         167      167           
  Lines       18120    18120           
  Branches     2036     2036           
=======================================
  Hits        15388    15388           
  Misses       2732     2732           
Files Coverage Δ
packages/data-store/src/data-store.ts 97.24% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mirceanis mirceanis merged commit 4ee626d into main Oct 6, 2023
11 checks passed
@mirceanis mirceanis deleted the 1269-delete-credentials-delete-claims branch October 6, 2023 10:44
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.

2 participants