diff --git a/e2e/fedimint.spec.ts b/e2e/fedimint.spec.ts index 453f448f..2e368f50 100644 --- a/e2e/fedimint.spec.ts +++ b/e2e/fedimint.spec.ts @@ -22,8 +22,6 @@ test("fedmint join, receive, send", async ({ page }) => { // Fill the input with the federation code await page.fill("input[name='federation_code']", SIGNET_INVITE_CODE); - await page.getByText("Mutinynet Signet Federation").waitFor(); - const addButton = await page.getByRole("button", { name: "Add" }).first(); // Click the "Add" button diff --git a/src/routes/settings/ManageFederations.tsx b/src/routes/settings/ManageFederations.tsx index 45315e46..24b529cb 100644 --- a/src/routes/settings/ManageFederations.tsx +++ b/src/routes/settings/ManageFederations.tsx @@ -9,7 +9,6 @@ import { FederationBalance, TagItem } from "@mutinywallet/mutiny-wasm"; import { A, useNavigate, useSearchParams } from "@solidjs/router"; import { BadgeCheck, LogOut, Scan, Trash } from "lucide-solid"; import { - createMemo, createResource, createSignal, For, @@ -32,9 +31,7 @@ import { FederationPopup, InfoBox, KeyValue, - LabelCircle, LargeHeader, - LoadingShimmer, MediumHeader, MiniStringShower, MutinyWalletGuard, @@ -100,8 +97,6 @@ export function AddFederationForm(props: { const [error, setError] = createSignal(); const [success, setSuccess] = createSignal(""); - const [loadingFederation, setLoadingFederation] = createSignal(""); - const [params, setParams] = useSearchParams(); onMount(() => { @@ -126,16 +121,6 @@ export function AddFederationForm(props: { await onSelect([federation_code]); }; - const [federations] = createResource(async () => { - try { - const federations = await sw.discover_federations(); - return federations; - } catch (e) { - console.error(e); - return []; - } - }); - const onSelect = async (inviteCodes: string[]) => { setSuccess(""); setError(undefined); @@ -143,7 +128,6 @@ export function AddFederationForm(props: { for (const inviteCode of inviteCodes) { try { console.log("Adding federation:", inviteCode); - setLoadingFederation(inviteCode); const newFederation = await sw.new_federation(inviteCode); console.log("New federation added:", newFederation); break; @@ -182,7 +166,6 @@ export function AddFederationForm(props: { console.error("Error submitting federation:", e); setError(eify(e)); } - setLoadingFederation(""); }; return ( @@ -235,125 +218,10 @@ export function AddFederationForm(props: { - - - {i18n.t("settings.manage_federations.discover")} - - - - - - - - - - - - - {(fed) => ( - - )} - - - - ); } -function FederationFormItem(props: { - fed: DiscoveredFederation; - onSelect: (invite_codes: string[]) => void; - loadingFederation: string; - setup: boolean; -}) { - const [state, _actions, _sw] = useMegaStore(); - const i18n = useI18n(); - - const alreadyAdded = createMemo(() => { - const matches = state.federations?.find((f) => - props.fed.invite_codes.includes(f.invite_code) - ); - return matches !== undefined; - }); - return ( - - -
- -
-
- {props.fed.metadata?.name} -
- -

{props.fed.metadata?.about}

-
-
-
- - - - - - - - - - - 0}> - -
- - {(contact) => ( - - )} - -
-
-
- - - -
-
- ); -} - function RecommendButton(props: { fed: MutinyFederationIdentity }) { const [_state, _actions, sw] = useMegaStore(); const i18n = useI18n();