decentralized-identity / veramo

A JavaScript Framework for Verifiable Data
https://veramo.io
Apache License 2.0
414 stars 130 forks source link

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

Closed mirceanis closed 9 months ago

mirceanis commented 9 months ago

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:

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[bot] commented 9 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

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 ```diff @@ 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](https://app.codecov.io/gh/uport-project/veramo/pull/1270?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uport-project) | Coverage Δ | | |---|---|---| | [packages/data-store/src/data-store.ts](https://app.codecov.io/gh/uport-project/veramo/pull/1270?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uport-project#diff-cGFja2FnZXMvZGF0YS1zdG9yZS9zcmMvZGF0YS1zdG9yZS50cw==) | `97.24% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.