From 889fa0a2863f9ef8b0d054f61ec2a80714e462ad Mon Sep 17 00:00:00 2001 From: Silberengel Date: Mon, 25 May 2026 18:37:32 +0200 Subject: [PATCH] get rid of long-press zaps change zaps to tips, inclluding icon --- src/components/NoteStats/ZapButton.tsx | 7 +- .../PaymentMethodsSection/index.tsx | 2 +- .../PaytoDialog/LightningInvoiceSection.tsx | 5 + src/components/Profile/index.tsx | 1 + src/components/ProfileZapButton/index.tsx | 6 +- src/components/ZapDialog/index.tsx | 7 +- src/hooks/useNip57QuickZap.ts | 62 +++++++-- src/i18n/locales/de.ts | 20 ++- src/i18n/locales/en.ts | 20 ++- .../secondary/ProfileEditorPage/index.tsx | 4 +- src/services/lightning.service.ts | 118 +++++++++++++++--- 11 files changed, 205 insertions(+), 47 deletions(-) diff --git a/src/components/NoteStats/ZapButton.tsx b/src/components/NoteStats/ZapButton.tsx index 3f51648d..86c74835 100644 --- a/src/components/NoteStats/ZapButton.tsx +++ b/src/components/NoteStats/ZapButton.tsx @@ -13,7 +13,7 @@ import { useNostr } from '@/providers/NostrProvider' import client, { replaceableEventService } from '@/services/client.service' import type { TProfile } from '@/types' import { kinds, type Event } from 'nostr-tools' -import { Zap } from 'lucide-react' +import { Coins } from 'lucide-react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import ZapDialog from '../ZapDialog' @@ -217,7 +217,7 @@ export function ZapButtonWithStats({ event, hideCount = false, noteStats }: ZapB setOpenPaymentDialog(true) } - const zapButtonTitle = disable ? t('Zaps') : t('Payment methods') + const zapButtonTitle = disable ? t('Tips') : t('Leave a tip') return ( <> @@ -233,9 +233,8 @@ export function ZapButtonWithStats({ event, hideCount = false, noteStats }: ZapB disabled={disable} onClick={handleOpenPaymentMethods} > -
- {title ?? t('Payment Methods')} + {title ?? t('Payment targets')}
diff --git a/src/components/PaytoDialog/LightningInvoiceSection.tsx b/src/components/PaytoDialog/LightningInvoiceSection.tsx index 2dcdbf14..29bff563 100644 --- a/src/components/PaytoDialog/LightningInvoiceSection.tsx +++ b/src/components/PaytoDialog/LightningInvoiceSection.tsx @@ -195,6 +195,11 @@ export default function LightningInvoiceSection({

{lightningAddress}

+

+ {t( + 'Plain Lightning payments do not create NIP-57 zap receipts on Nostr. Use the zap button when available.' + )} +