Skip to content

Commit

Permalink
fix(credential-eip712): remove JSON.stringify for string credential (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 authored May 15, 2023
1 parent d6afc3f commit 469dcd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/credential-eip712/src/agent/CredentialEIP712.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ export class CredentialIssuerEIP712 implements IAgentPlugin {
if (args.presentation.verifiableCredential) {
const credentials = args.presentation.verifiableCredential.map((cred) => {
// map JWT credentials to their canonical form
if (typeof cred !== 'string' && cred.proof.jwt) {
if(typeof cred === 'string') {
return cred
} else if (cred.proof.jwt) {
return cred.proof.jwt
} else {
return JSON.stringify(cred)
Expand Down

0 comments on commit 469dcd9

Please sign in to comment.