Fix unknown verification skip

This commit is contained in:
Yarmo Mackenbach 2020-06-28 13:57:31 +02:00
parent cfc0f59fa4
commit 0e98e57e54

View file

@ -154,14 +154,14 @@ async function verifyProofs(opts) {
let notation, isVerified, verifications = []; let notation, isVerified, verifications = [];
for (var i = 0; i < keyData.notations.length; i++) { for (var i = 0; i < keyData.notations.length; i++) {
notation = keyData.notations[i]; notation = keyData.notations[i];
if (notation[0] == "proof@metacode.biz") { continue; } if (notation[0] != "proof@metacode.biz") { continue; }
verifications.push(await verifyProof(notation[1], keyData.fingerprint)); verifications.push(await verifyProof(notation[1], keyData.fingerprint));
} }
// Generate feedback // Generate feedback
feedback += `<p>`; feedback += `<p>`;
for (var i = 0; i < verifications.length; i++) { for (var i = 0; i < verifications.length; i++) {
if (!verifications[i].type) { continue; } // if (verifications[i].type == "null") { continue; }
feedback += `${verifications[i].type}: `; feedback += `${verifications[i].type}: `;
feedback += `<a class="proofDisplay" href="${verifications[i].url}">${verifications[i].display}</a>`; feedback += `<a class="proofDisplay" href="${verifications[i].url}">${verifications[i].display}</a>`;
if (verifications[i].isVerified) { if (verifications[i].isVerified) {
@ -187,7 +187,7 @@ async function displayProfile(opts) {
for (var i = 0; i < keyData.notations.length; i++) { for (var i = 0; i < keyData.notations.length; i++) {
notation = keyData.notations[i]; notation = keyData.notations[i];
if (notation[0] == "proof@metacode.biz") { continue; } if (notation[0] != "proof@metacode.biz") { continue; }
verifications.push(await verifyProof(notation[1], keyData.fingerprint)); verifications.push(await verifyProof(notation[1], keyData.fingerprint));
} }
@ -212,7 +212,7 @@ async function displayProfile(opts) {
feedback += `<div class="profileDataItem__value">proofs</div>`; feedback += `<div class="profileDataItem__value">proofs</div>`;
feedback += `</div>`; feedback += `</div>`;
for (var i = 0; i < verifications.length; i++) { for (var i = 0; i < verifications.length; i++) {
if (!verifications[i].type) { continue; } // if (!verifications[i].type) { continue; }
feedback += `<div class="profileDataItem">`; feedback += `<div class="profileDataItem">`;
feedback += `<div class="profileDataItem__label">${verifications[i].type}</div>`; feedback += `<div class="profileDataItem__label">${verifications[i].type}</div>`;
feedback += `<div class="profileDataItem__value">`; feedback += `<div class="profileDataItem__value">`;