diff --git a/src/components/Embedded/EmbeddedLNInvoice.tsx b/src/components/Embedded/EmbeddedLNInvoice.tsx index e68297a..d933e1e 100644 --- a/src/components/Embedded/EmbeddedLNInvoice.tsx +++ b/src/components/Embedded/EmbeddedLNInvoice.tsx @@ -1,19 +1,18 @@ +import { Button } from '@/components/ui/button' +import { useToast } from '@/hooks' import { formatAmount, getAmountFromInvoice } from '@/lib/lightning' -import { cn } from '@/lib/utils' import { useNostr } from '@/providers/NostrProvider' -import { useToast } from '@/hooks' -import { Loader, Zap } from 'lucide-react' import lightning from '@/services/lightning.service' +import { Loader, Zap } from 'lucide-react' import { useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Button } from '@/components/ui/button' export function EmbeddedLNInvoice({ invoice }: { invoice: string }) { const { t } = useTranslation() const { toast } = useToast() const { checkLogin, pubkey } = useNostr() const [paying, setPaying] = useState(false) - + const amount = useMemo(() => { return getAmountFromInvoice(invoice) }, [invoice]) @@ -47,37 +46,19 @@ export function EmbeddedLNInvoice({ invoice }: { invoice: string }) { return (
e.stopPropagation()} >
- -

Lightning Invoice

+ +
{t('Lightning Invoice')}
- {formatAmount(amount)} + {formatAmount(amount)} {t('sats')}
-
) diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 527bda4..b53808b 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -239,6 +239,7 @@ export default { 'Followed by': 'متابع من قبل', 'Mute user privately': 'كتم المستخدم بشكل خاص', 'Mute user publicly': 'كتم المستخدم علنياً', - Quotes: 'الاقتباسات' + Quotes: 'الاقتباسات', + 'Lightning Invoice': 'فاتورة Lightning' } } diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 072a38c..9967d82 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -246,6 +246,7 @@ export default { 'Followed by': 'Gefolgt von', 'Mute user privately': 'Benutzer privat stummschalten', 'Mute user publicly': 'Benutzer öffentlich stummschalten', - Quotes: 'Zitate' + Quotes: 'Zitate', + 'Lightning Invoice': 'Lightning-Rechnung' } } diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 7ab2712..c9a9377 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -239,6 +239,7 @@ export default { 'Followed by': 'Followed by', 'Mute user privately': 'Mute user privately', 'Mute user publicly': 'Mute user publicly', - Quotes: 'Quotes' + Quotes: 'Quotes', + 'Lightning Invoice': 'Lightning Invoice' } } diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 2e1a2ee..d30d43b 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -244,6 +244,7 @@ export default { 'Followed by': 'Seguidos por', 'Mute user privately': 'Silenciar usuario en privado', 'Mute user publicly': 'Silenciar usuario públicamente', - Quotes: 'Citas' + Quotes: 'Citas', + 'Lightning Invoice': 'Factura Lightning' } } diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 0530db2..0ebdb63 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -244,6 +244,7 @@ export default { 'Followed by': 'Suivi par', 'Mute user privately': 'Mettre l’utilisateur en sourdine en privé', 'Mute user publicly': 'Mettre l’utilisateur en sourdine publiquement', - Quotes: 'Citations' + Quotes: 'Citations', + 'Lightning Invoice': 'Facture Lightning' } } diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index 1c5db93..e743790 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -243,6 +243,7 @@ export default { 'Followed by': 'Seguito da', 'Mute user privately': 'Zittisci utente privatamente', 'Mute user publicly': 'Zittisci utente pubblicamente', - Quotes: 'Citazioni' + Quotes: 'Citazioni', + 'Lightning Invoice': 'Fattura Lightning' } } diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index 01092e6..19247db 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -240,6 +240,7 @@ export default { 'Followed by': 'フォロワー', 'Mute user privately': 'ユーザーを非公開でミュート', 'Mute user publicly': 'ユーザーを公開でミュート', - Quotes: '引用' + Quotes: '引用', + 'Lightning Invoice': 'ライトニングインボイス' } } diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index c4822ab..3e6b423 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -242,6 +242,7 @@ export default { 'Followed by': 'Obserwowany przez', 'Mute user privately': 'Zablokuj użytkownika prywatnie', 'Mute user publicly': 'Zablokuj użytkownika publicznie', - Quotes: 'Cytaty' + Quotes: 'Cytaty', + 'Lightning Invoice': 'Faktura Lightning' } } diff --git a/src/i18n/locales/pt-BR.ts b/src/i18n/locales/pt-BR.ts index 1d18c3b..9043325 100644 --- a/src/i18n/locales/pt-BR.ts +++ b/src/i18n/locales/pt-BR.ts @@ -242,6 +242,7 @@ export default { 'Followed by': 'Seguido por', 'Mute user privately': 'Silenciar usuário privadamente', 'Mute user publicly': 'Silenciar usuário publicamente', - Quotes: 'Citações' + Quotes: 'Citações', + 'Lightning Invoice': 'Fatura Lightning' } } diff --git a/src/i18n/locales/pt-PT.ts b/src/i18n/locales/pt-PT.ts index 1c60a09..5d41a38 100644 --- a/src/i18n/locales/pt-PT.ts +++ b/src/i18n/locales/pt-PT.ts @@ -243,6 +243,7 @@ export default { 'Followed by': 'Seguido por', 'Mute user privately': 'Silenciar usuário privadamente', 'Mute user publicly': 'Silenciar usuário publicamente', - Quotes: 'Citações' + Quotes: 'Citações', + 'Lightning Invoice': 'Fatura Lightning' } } diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 4402369..002f091 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -244,6 +244,7 @@ export default { 'Followed by': 'Подписан на', 'Mute user privately': 'Заглушить пользователя приватно', 'Mute user publicly': 'Заглушить пользователя публично', - Quotes: 'Цитаты' + Quotes: 'Цитаты', + 'Lightning Invoice': 'Lightning-счет' } } diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index 630ea62..e94820c 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -240,6 +240,7 @@ export default { 'Followed by': '关注者', 'Mute user privately': '悄悄屏蔽', 'Mute user publicly': '公开屏蔽', - Quotes: '引用' + Quotes: '引用', + 'Lightning Invoice': '闪电发票' } }