From 2e1d48168a93471cae72db9c5c78287809b23f58 Mon Sep 17 00:00:00 2001 From: enes Date: Fri, 20 Sep 2024 11:13:48 +0200 Subject: [PATCH] refactor: rename userId to npub --- src/utils/nostr.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/nostr.ts b/src/utils/nostr.ts index 1082328..248f71a 100644 --- a/src/utils/nostr.ts +++ b/src/utils/nostr.ts @@ -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 - * @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 */ export const getProfileUsername = ( - userId: `npub1${string}` | string, + npub: `npub1${string}` | string, profile?: ProfileMetadata ) => - truncate(profile?.display_name || profile?.name || hexToNpub(userId), { + truncate(profile?.display_name || profile?.name || hexToNpub(npub), { length: 16 })