From ba146ffe6591e22fc087810742bd6919ba5d6699 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Sun, 19 May 2024 23:09:01 -0400 Subject: [PATCH] Fix enveloped VC type check. --- lib/issue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/issue.js b/lib/issue.js index 4e21145..c64510a 100644 --- a/lib/issue.js +++ b/lib/issue.js @@ -59,7 +59,7 @@ export async function issue({config, credential, updateValidity = true} = {}) { function _isEnvelopedCredential({verifiableCredential} = {}) { return (verifiableCredential['@context'] === CREDENTIALS_CONTEXT_V2_URL && - verifiableCredential.type === 'EnvelopedCredential' && + verifiableCredential.type === 'EnvelopedVerifiableCredential' && verifiableCredential.id?.startsWith('data:') && verifiableCredential.id.includes(',')); }