don't hide lightning address CTA if not in federation

This commit is contained in:
Paul Miller
2024-04-29 16:35:51 -05:00
committed by Tony Giorgio
parent 39a7e4d9bf
commit d91c1832a3
4 changed files with 17 additions and 15 deletions

View File

@@ -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": {

View File

@@ -88,9 +88,7 @@ export function Profile() {
</ButtonCard>
<Show
when={
state.federations?.length &&
!hasMutinyAddress() &&
import.meta.env.VITE_HERMES
!hasMutinyAddress() && import.meta.env.VITE_HERMES
}
>
<ButtonCard

View File

@@ -149,7 +149,7 @@ export function LightningAddress() {
const [error, setError] = createSignal<Error>();
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() {
<Switch>
<Match when={!state.mutiny_plus && ios}>
<InfoBox accent="white">
Mutiny Address requires Mutiny+ which cannot be
purchased with this app.
{i18n.t(
"settings.lightning_address.ios_warning"
)}
</InfoBox>
</Match>
<Match when={!state.mutiny_plus}>
@@ -231,7 +232,11 @@ export function LightningAddress() {
<MutinyPlusCta />
</Match>
<Match when={!lnurlName() && state.federations?.length}>
<HermesForm onSubmit={() => refetch()} />
<HermesForm
onSubmit={() => {
navigate("/profile");
}}
/>
</Match>
<Match
when={
@@ -262,7 +267,9 @@ export function LightningAddress() {
</Match>
<Match when={true}>
<NiceP>
Add a federation to reserve lightning address.
{i18n.t(
"settings.lightning_address.add_a_federation"
)}
</NiceP>
<ButtonCard
onClick={() =>

View File

@@ -203,12 +203,7 @@ export function Plus() {
{i18n.t("settings.plus.wallet_connection")}
</A>
</NiceP>
<Show
when={
state.federations?.length &&
import.meta.env.VITE_HERMES
}
>
<Show when={import.meta.env.VITE_HERMES}>
<ButtonCard
onClick={() =>
navigate("/settings/lightningaddress")