Skip to content

Commit

Permalink
Added unconfirmed count to status
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Dec 19, 2024
1 parent 666850e commit f208972
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatekeeper/src/gatekeeper-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export async function checkDIDs(options = {}) {
const total = dids.length;
let n = 0;
let confirmed = 0;
let unconfirmed = 0;
let ephemeral = 0;
let invalid = 0;
const byRegistry = {};
Expand All @@ -142,6 +143,9 @@ export async function checkDIDs(options = {}) {
if (doc.didDocumentMetadata.confirmed) {
confirmed += 1;
}
else {
unconfirmed += 1;
}

if (doc.mdip.validUntil) {
ephemeral += 1;
Expand All @@ -161,7 +165,7 @@ export async function checkDIDs(options = {}) {
}
}

return { total, confirmed, ephemeral, invalid, byRegistry, byVersion };
return { total, confirmed, unconfirmed, ephemeral, invalid, byRegistry, byVersion };
}

export async function initRegistries(csvRegistries) {
Expand Down
1 change: 1 addition & 0 deletions services/gatekeeper/server/src/gatekeeper-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ async function reportStatus() {
console.log(` 6+: ${status.dids.total - count}`);

console.log(` Confirmed: ${status.dids.confirmed}`);
console.log(` Unconfirmed: ${status.dids.unconfirmed}`);
console.log(` Ephemeral: ${status.dids.ephemeral}`);
console.log(` Invalid: ${status.dids.invalid}`);

Expand Down

0 comments on commit f208972

Please sign in to comment.