Skip to content

Commit

Permalink
chore: added isSdJwtDecodedCredential exception to countVCsInAllVPs b…
Browse files Browse the repository at this point in the history
…ecause toUniformPresentation returns a sd-jwt vc and not vp
  • Loading branch information
sanderPostma committed Nov 14, 2024
1 parent 76d2414 commit 5056f04
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 5056f04

Please sign in to comment.