Skip to content

Commit

Permalink
Remove mutiny plus references
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGiorgio committed Jul 1, 2024
1 parent 625c0f6 commit 6e31400
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 71 deletions.
5 changes: 0 additions & 5 deletions e2e/routes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const settingsRoutes = [
"/connections",
"/currency",
"/emergencykit",
"/plus",
"/restore",
"/servers",
"/nostrkeys"
Expand Down Expand Up @@ -62,10 +61,6 @@ test("visit each route", async ({ page }) => {

checklist.set("/settings", true);

// Mutiny+
await checkRoute(page, "/settings/plus", "Mutiny+", checklist);
await page.goBack();

// Lightning Channels
await checkRoute(
page,
Expand Down
37 changes: 1 addition & 36 deletions src/routes/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createAsync, useNavigate } from "@solidjs/router";
import { AtSign, Edit, Import } from "lucide-solid";
import { Edit, Import } from "lucide-solid";
import { createMemo, Show, Suspense } from "solid-js";

import {
Expand Down Expand Up @@ -47,21 +47,6 @@ export function Profile() {
return profile()?.deleted === true || profile()?.deleted === "true";
});

const hasMutinyAddress = createMemo(() => {
if (profile()?.lud16) {
const hermes = import.meta.env.VITE_HERMES;
if (!hermes) {
return false;
}
const hermesDomain = new URL(hermes).hostname;
const afterAt = profile()?.lud16!.split("@")[1];
if (afterAt && afterAt.includes(hermesDomain)) {
return true;
}
}
return false;
});

return (
<MutinyWalletGuard>
<DefaultMain>
Expand Down Expand Up @@ -89,26 +74,6 @@ export function Profile() {
<NiceP>{i18n.t("profile.edit_profile")}</NiceP>
</div>
</ButtonCard>
<Show
when={
!hasMutinyAddress() && import.meta.env.VITE_HERMES
}
>
<ButtonCard
onClick={() =>
navigate("/settings/lightningaddress")
}
>
<div class="flex items-center gap-2">
<AtSign class="inline-block text-m-red" />
<NiceP>
{i18n.t(
"settings.lightning_address.create"
)}
</NiceP>
</div>
</ButtonCard>
</Show>
</Show>
<Show when={profile() && profile()?.deleted}>
<ButtonCard
Expand Down
22 changes: 1 addition & 21 deletions src/routes/settings/Plus.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { A, useNavigate } from "@solidjs/router";
import { AtSign } from "lucide-solid";
import { A } from "@solidjs/router";
import {
createResource,
createSignal,
Expand All @@ -13,7 +12,6 @@ import party from "~/assets/party.gif";
import {
BackLink,
Button,
ButtonCard,
ConfirmDialog,
DefaultMain,
ExternalLink,
Expand Down Expand Up @@ -170,8 +168,6 @@ export function Plus() {
const i18n = useI18n();
const [state, _actions] = useMegaStore();

const navigate = useNavigate();

return (
<MutinyWalletGuard>
<DefaultMain>
Expand All @@ -198,22 +194,6 @@ export function Plus() {
{i18n.t("settings.plus.wallet_connection")}
</A>
</NiceP>
<Show when={import.meta.env.VITE_HERMES}>
<ButtonCard
onClick={() =>
navigate("/settings/lightningaddress")
}
>
<div class="flex items-center gap-2">
<AtSign class="inline-block text-m-red" />
<NiceP>
{i18n.t(
"settings.lightning_address.create"
)}
</NiceP>
</div>
</ButtonCard>
</Show>
</Match>
<Match when={!state.mutiny_plus}>
<NiceP>
Expand Down
9 changes: 0 additions & 9 deletions src/routes/settings/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Capacitor } from "@capacitor/core";
import { A } from "@solidjs/router";
import { ChevronRight } from "lucide-solid";
import { For, Show } from "solid-js";
Expand All @@ -8,7 +7,6 @@ import {
DefaultMain,
ExternalLink,
LargeHeader,
MutinyPlusCta,
NavBar,
SettingsCard,
TinyText,
Expand Down Expand Up @@ -73,18 +71,11 @@ export function Settings() {
// @ts-ignore
const COMMIT_HASH = import.meta.env.__COMMIT_HASH__;

const selfHosted = state.settings?.selfhosted === "true";

const ios = Capacitor.getPlatform() === "ios";

return (
<DefaultMain>
<BackLink />
<LargeHeader>{i18n.t("settings.header")}</LargeHeader>
<VStack biggap>
<Show when={state.mutiny_plus || (!selfHosted && !ios)}>
<MutinyPlusCta />
</Show>
<SettingsLinkList
header={i18n.t("settings.general")}
links={[
Expand Down

0 comments on commit 6e31400

Please sign in to comment.