diff --git a/packages/daf-w3c/src/message-validator.ts b/packages/daf-w3c/src/message-validator.ts index c3532afbd..06cd2b152 100644 --- a/packages/daf-w3c/src/message-validator.ts +++ b/packages/daf-w3c/src/message-validator.ts @@ -90,7 +90,6 @@ export class MessageValidator extends AbstractMessageValidator { vc.subject.did = payload.sub vc.raw = jwt - vc.credentialSubject = payload.vc.credentialSubject if (payload.nbf || payload.iat) { vc.issuanceDate = this.timestampToDate(payload.nbf || payload.iat) @@ -103,6 +102,8 @@ export class MessageValidator extends AbstractMessageValidator { vc.context = payload.vc['@context'] vc.type = payload.vc.type + vc.credentialSubject = payload.vc.credentialSubject + return vc }