Assign name on login, change confirm modals, change push warning, reject reqs before connect

This commit is contained in:
artur
2024-02-07 10:41:00 +03:00
parent 326d824451
commit d00e16139e
8 changed files with 146 additions and 61 deletions

View File

@@ -15,6 +15,12 @@ export const getShortenNpub = (npub = '') => {
return npub.substring(0, 10) + '...' + npub.slice(-4)
}
export const getAppIconTitle = (name: string | undefined, appNpub: string) => {
return name
? name[0].toLocaleUpperCase()
: appNpub.substring(4, 7);
}
export const getProfileUsername = (profile: MetaEvent | null, npub: string) => {
return profile?.info?.name || profile?.info?.display_name || getShortenNpub(npub)
}