From 37ec9c4e63a4447cff0d5bf547eae90171d2ceb4 Mon Sep 17 00:00:00 2001 From: F-Node-Karlsruhe Date: Fri, 17 Mar 2023 10:56:16 +0100 Subject: [PATCH] fix presentation ui for proof arrays --- frontend/src/utils.js | 6 ++++++ frontend/src/views/Verify.vue | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) 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 @@