Skip to content

Commit

Permalink
fix: corrected wrong casting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmylonas committed Apr 11, 2024
1 parent 517b908 commit be3223b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/issuer/credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ export function getIssuerFromVC(vc: VerifiableCredential): DID | undefined {
export function getSubjectFromVP(vc: VerifiableCredential): DID | undefined {
const jwtService = new JWTService()
if(typeof vc === 'string') {
const credential = jwtService.decodeJWT(vc) as JWTPayload
return credential.sub as string
const { payload } = jwtService.decodeJWT(vc)
return payload.sub as string
} else {
return vc.credentialSubject.id
}
Expand Down

0 comments on commit be3223b

Please sign in to comment.