diff --git a/frontend/src/utils.js b/frontend/src/utils.js index dfbe4e1..9730b06 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -29,6 +29,12 @@ export function getVerifiableType(verifiable) { return VerifiableType.CREDENTIAL; } +export function getHolder(presentation) { + if (presentation.holder) return presentation.holder; + const proof = Array.isArray(presentation.proof) ? presentation.proof[0] : presentation.proof + return proof.verificationMethod.split('#')[0]; +} + export async function getContext(credential) { const resolved = await jsonld.processContext(await jsonld.processContext(null, null), credential); return resolved.mappings; diff --git a/frontend/src/views/Verify.vue b/frontend/src/views/Verify.vue index 7559183..5c80a31 100644 --- a/frontend/src/views/Verify.vue +++ b/frontend/src/views/Verify.vue @@ -35,7 +35,7 @@