Add lightning and nostr prefix to profile qr info

This commit is contained in:
Bojan Mojsilovic 2024-04-05 00:36:17 +02:00
parent e331c7afe8
commit 2e87f52c87

View File

@ -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}`,
}
});