Skip to content

Commit

Permalink
Use allOf instead of an invalid contains in VPR conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Sep 20, 2024
1 parent 5e616b1 commit 7444039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @digitalbazaar/oid4-client Changelog

## 4.0.0 - 2024-09-dd

### Changed
- **BREAKING**: Use `allOf` instead of an invalid `contains` with an
array value when generating presentation filters from a VPR.

## 3.8.0 - 2024-09-20

### Added
Expand Down
7 changes: 1 addition & 6 deletions lib/oid4vp.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,16 +590,11 @@ export function _fromQueryByExampleQuery({credentialQuery, prefixJwtVcPath}) {
const filter = {};
if(Array.isArray(value)) {
filter.type = 'array';
// FIXME: create `allOf`
/*filter.allOf = value.map(v => ({
filter.allOf = value.map(v => ({
contains: {
type: 'string',
const: v
}
}));*/
filter.contains = value.map(v => ({
type: 'string',
const: v
}));
} else if(key === 'type') {
// special provision for array/string for `type`
Expand Down

0 comments on commit 7444039

Please sign in to comment.