Skip to content

Commit

Permalink
Merge pull request #278 from Sphereon-Opensource/fixes/countVCsInAllVPs
Browse files Browse the repository at this point in the history
chore: added isSdJwtDecodedCredential exception to countVCsInAllVPs because toUniformPresentation returns a sd-jwt vc and not vp
  • Loading branch information
sanderPostma authored Nov 20, 2024
2 parents 2b7916b + caed443 commit 32d2e49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/siopv2-oid4vp-op-auth/src/session/OpSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,11 @@ export class OpSession {
if (uvp.verifiableCredential?.length) {
return sum + uvp.verifiableCredential?.length
}
if (!PEX.allowMultipleVCsPerPresentation(uvp.verifiableCredential as Array<OriginalVerifiableCredential>)) {
const isSdJWT = CredentialMapper.isSdJwtDecodedCredential(uvp)
if (
isSdJWT ||
(uvp.verifiableCredential && !PEX.allowMultipleVCsPerPresentation(uvp.verifiableCredential as Array<OriginalVerifiableCredential>))
) {
return sum + 1
}
return sum
Expand Down

0 comments on commit 32d2e49

Please sign in to comment.