From 2e87f52c87131af742804ce67cf0f6277c0e6a2a Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Fri, 5 Apr 2024 00:36:17 +0200 Subject: [PATCH] Add lightning and nostr prefix to profile qr info --- src/components/ProfileQrCodeModal/ProfileQrCodeModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ProfileQrCodeModal/ProfileQrCodeModal.tsx b/src/components/ProfileQrCodeModal/ProfileQrCodeModal.tsx index 8964677..8b8ff14 100644 --- a/src/components/ProfileQrCodeModal/ProfileQrCodeModal.tsx +++ b/src/components/ProfileQrCodeModal/ProfileQrCodeModal.tsx @@ -5,6 +5,7 @@ import { defaultZap, defaultZapOptions } from '../../constants'; import { useAccountContext } from '../../contexts/AccountContext'; import { useSettingsContext } from '../../contexts/SettingsContext'; import { hookForDev } from '../../lib/devTools'; +import { hexToNpub } from '../../lib/keys'; import { truncateNumber } from '../../lib/notifications'; import { zapNote, zapProfile } from '../../lib/zap'; import { authorName, nip05Verification, truncateNpub, userName } from '../../stores/profile'; @@ -37,11 +38,11 @@ const ProfileQrCodeModal: Component<{ const profileData = () => Object.entries({ pubkey: { title: 'Public key', - data: props.profile.npub || props.profile.pubkey, + data: `nostr:${props.profile.npub || hexToNpub(props.profile.pubkey)}`, }, lnAddress: { title: 'Lightning address', - data: props.profile.lud16 || props.profile.lud06, + data: `lightning:${props.profile.lud16 || props.profile.lud06}`, } });