forked from jsnbuchanan/crowd-funder-for-time-pwa
(chore): merge mostly pathway changes
This commit is contained in:
@@ -112,6 +112,21 @@ export const isGiveAction = (
|
||||
return isGiveClaimType(veriClaim.claimType);
|
||||
};
|
||||
|
||||
export const shortDid = (did: string) => {
|
||||
if (did.startsWith("did:peer:")) {
|
||||
return (
|
||||
did.substring(0, "did:peer:".length + 2) +
|
||||
"..." +
|
||||
did.substring("did:peer:".length + 18, "did:peer:".length + 25) +
|
||||
"..."
|
||||
);
|
||||
} else if (did.startsWith("did:ethr:")) {
|
||||
return did.substring(0, "did:ethr:".length + 9) + "...";
|
||||
} else {
|
||||
return did.substring(0, did.indexOf(":", 4) + 7) + "...";
|
||||
}
|
||||
}
|
||||
|
||||
export const nameForDid = (
|
||||
activeDid: string,
|
||||
contacts: Array<Contact>,
|
||||
|
||||
Reference in New Issue
Block a user