From d91c1832a399fec5b5bdebbbc2c22aa38a4c7206 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Mon, 29 Apr 2024 16:35:51 -0500 Subject: [PATCH] don't hide lightning address CTA if not in federation --- public/i18n/en.json | 4 +++- src/routes/Profile.tsx | 4 +--- src/routes/settings/LightningAddress.tsx | 17 ++++++++++++----- src/routes/settings/Plus.tsx | 7 +------ 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/public/i18n/en.json b/public/i18n/en.json index bc7065d..57ec35d 100644 --- a/public/i18n/en.json +++ b/public/i18n/en.json @@ -614,7 +614,9 @@ "lightning_address": { "title": "Mutiny Address", "description": "Get zaps and payments to your wallet with your own lightning address.", - "create": "Create Mutiny Address" + "create": "Create Mutiny Address", + "add_a_federation": "To enable this feature you need to be a member of a federation.", + "ios_warning": "Mutiny Address requires Mutiny+ which cannot be purchased with this app." } }, "swap": { diff --git a/src/routes/Profile.tsx b/src/routes/Profile.tsx index 6e62b9a..066b95e 100644 --- a/src/routes/Profile.tsx +++ b/src/routes/Profile.tsx @@ -88,9 +88,7 @@ export function Profile() { (); const [settingLnAddress, setSettingLnAddress] = createSignal(false); - const [lnurlName, { refetch }] = createResource(async () => { + const [lnurlName] = createResource(async () => { try { const name = await state.mutiny_wallet?.check_lnurl_name(); return name; @@ -219,8 +219,9 @@ export function LightningAddress() { - Mutiny Address requires Mutiny+ which cannot be - purchased with this app. + {i18n.t( + "settings.lightning_address.ios_warning" + )} @@ -231,7 +232,11 @@ export function LightningAddress() { - refetch()} /> + { + navigate("/profile"); + }} + /> - Add a federation to reserve lightning address. + {i18n.t( + "settings.lightning_address.add_a_federation" + )} diff --git a/src/routes/settings/Plus.tsx b/src/routes/settings/Plus.tsx index e009c05..c0b65b0 100644 --- a/src/routes/settings/Plus.tsx +++ b/src/routes/settings/Plus.tsx @@ -203,12 +203,7 @@ export function Plus() { {i18n.t("settings.plus.wallet_connection")} - + navigate("/settings/lightningaddress")