From 91244b992b5d9f835e7ce003d3b54ed88a40ec2f Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Wed, 4 Oct 2023 10:01:09 +0200 Subject: [PATCH] fix: references to display object --- static-src/kx-claim.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static-src/kx-claim.js b/static-src/kx-claim.js index 187a0bb..41feb40 100644 --- a/static-src/kx-claim.js +++ b/static-src/kx-claim.js @@ -61,7 +61,7 @@ export class Claim extends HTMLElement { const claimJson = JSON.parse(value); const claim = doipjs.Claim.fromJSON(claimJson); - root.querySelector('.info .title').innerText = claimJson.display.name; + root.querySelector('.info .title').innerText = claimJson.display.profileName; root.querySelector('.info .subtitle').innerText = claimJson.display.serviceProviderName ?? (claim.status < 300 ? '???' : '---'); root.querySelector('.info img').setAttribute('src', @@ -108,15 +108,15 @@ export class Claim extends HTMLElement { const subsection_links_text = subsection_links.appendChild(document.createElement('div')); const profile_link = subsection_links_text.appendChild(document.createElement('p')); - if (claim.matches[0].profile.uri) { - profile_link.innerHTML = `Profile link: ${claim.matches[0].profile.uri}`; + if (claimJson.display.profileUri) { + profile_link.innerHTML = `Profile link: ${claimJson.display.profileUri}`; } else { profile_link.innerHTML = `Profile link: not accessible from browser`; } const proof_link = subsection_links_text.appendChild(document.createElement('p')); - if (claim.matches[0].proof.request.uri) { - proof_link.innerHTML = `Proof link: ${claim.matches[0].proof.request.uri}`; + if (claimJson.display.proofUrl) { + proof_link.innerHTML = `Proof link: ${claimJson.display.proofUrl}`; } else { proof_link.innerHTML = `Proof link: not accessible from browser`; }