digitalbazaar / vc

W3C Verifiable Credentials implementation in JavaScript
BSD 3-Clause "New" or "Revised" License
173 stars 50 forks source link

fix `purpose` overriding `presentationPurpose` on _verifyPresentation() #137

Closed rflechtner closed 1 year ago

rflechtner commented 1 year ago

When composing an object, entries to the right take precedence over entries to the left. Overrides should thus be positioned to the right of the ...options spread. This actually causes a bug on line 472 where the presentation purpose is replaced by any purpose property in the options (which is meant to be passed down to verifyCredential instead).