add number of confirmers to certificate & show DID info when appropriate

This commit is contained in:
2024-12-20 15:49:42 -07:00
parent 2cb70f8497
commit e67ae23879
5 changed files with 57 additions and 23 deletions

View File

@@ -437,6 +437,7 @@ export function didInfoForContact(
activeDid: string | undefined,
contact?: Contact,
allMyDids: string[] = [],
showDidForVisible: boolean = false,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): { known: boolean; displayName: string; profileImageUrl?: string } {
if (!did) return { displayName: "Someone Unnamed/Unknown", known: false };
@@ -453,9 +454,11 @@ export function didInfoForContact(
return myId
? { displayName: "You (Alt ID)", known: true }
: isHiddenDid(did)
? { displayName: "Someone Totally Outside Your View", known: false }
? { displayName: "Someone Outside Your View", known: false }
: {
displayName: "Someone Visible But Outside Your Contact List",
displayName: showDidForVisible
? did
: "Someone Visible But Not In Your Contact List",
known: false,
};
}
@@ -483,8 +486,13 @@ export function didInfoForCertificate(
did: string | undefined,
contacts: Contact[],
): string {
return didInfoForContact(did, undefined, contactForDid(did, contacts), [])
.displayName;
return didInfoForContact(
did,
undefined,
contactForDid(did, contacts),
[],
true,
).displayName;
}
let passkeyAccessToken: string = "";