fix: #201, #145, #205 and additional fixes #206

Open
enes wants to merge 13 commits from 201-toolbox-update into staging
Showing only changes of commit 2e1d48168a - Show all commits

View File

@ -977,13 +977,13 @@ export const sendNotification = async (receiver: string, meta: Meta) => {
/** /**
* Show user's name, first available in order: display_name, name, or npub as fallback * Show user's name, first available in order: display_name, name, or npub as fallback
* @param userId User identifier, it can be either pubkey or npub1 (we only show npub) * @param npub User identifier, it can be either pubkey or npub1 (we only show npub)
* @param profile User profile * @param profile User profile
*/ */
export const getProfileUsername = ( export const getProfileUsername = (
userId: `npub1${string}` | string, npub: `npub1${string}` | string,
profile?: ProfileMetadata profile?: ProfileMetadata
) => ) =>
truncate(profile?.display_name || profile?.name || hexToNpub(userId), { truncate(profile?.display_name || profile?.name || hexToNpub(npub), {
length: 16 length: 16
}) })