Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip federation selector on startup #1231

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions e2e/fedimint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ test.beforeEach(async ({ page }) => {
test("fedmint join, receive, send", async ({ page }) => {
await loadHome(page);

// Click the top left button (it's the profile button), a child of header
// TODO: better ARIA stuff
await page.locator(`header button`).first().click();

// Click "Join a federation" cta
await page.click("text=Join a federation");

Expand All @@ -28,6 +32,9 @@ test("fedmint join, receive, send", async ({ page }) => {
// Wait for a header to appear with the text "MutinySignetFederation"
await page.getByText("MutinySignetFederation").waitFor();

// Navigate back to profile
await page.goBack();

// Navigate back home
await page.goBack();

Expand Down
6 changes: 3 additions & 3 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export async function loadHome(page: Page) {

await page.locator("button:has-text('Skip for now')").click();

await page.getByText("Pick a Federation").waitFor();
// await page.getByText("Pick a Federation").waitFor();

await page.locator("button:has-text('Skip for now')").click();
// await page.locator("button:has-text('Skip for now')").click();

await page.locator(`button:has-text('Confirm')`).click();
// await page.locator(`button:has-text('Confirm')`).click();

// Should have a balance up top now
await page.locator(`text=0 sats`).first().waitFor();
Expand Down
24 changes: 12 additions & 12 deletions src/components/Activity.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TagItem } from "@mutinywallet/mutiny-wasm";
import { cache, createAsync, useNavigate } from "@solidjs/router";
import { Plus, Save, Search, Shuffle, Users } from "lucide-solid";

Check warning on line 3 in src/components/Activity.tsx

View workflow job for this annotation

GitHub Actions / code_quality

'Users' is defined but never used. Allowed unused vars must match /^_/u
import {
createEffect,
createMemo,
Expand Down Expand Up @@ -441,18 +441,18 @@
</Show>
<Switch>
<Match when={activity.latest?.length === 0}>
<Show when={state.federations?.length === 0}>
<ButtonCard
onClick={() =>
navigate("/settings/federations")
}
>
<div class="flex items-center gap-2">
<Users class="inline-block text-m-red" />
<NiceP>{i18n.t("home.federation")}</NiceP>
</div>
</ButtonCard>
</Show>
{/*<Show when={state.federations?.length === 0}>*/}
{/* <ButtonCard*/}
{/* onClick={() =>*/}
{/* navigate("/settings/federations")*/}
{/* }*/}
{/* >*/}
{/* <div class="flex items-center gap-2">*/}
{/* <Users class="inline-block text-m-red" />*/}
{/* <NiceP>{i18n.t("home.federation")}</NiceP>*/}
{/* </div>*/}
{/* </ButtonCard>*/}
{/*</Show>*/}
<ButtonCard onClick={() => navigate("/receive")}>
<div class="flex items-center gap-2">
<Plus class="inline-block text-m-red" />
Expand Down
6 changes: 4 additions & 2 deletions src/routes/setup/NewProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export function NewProfile() {
);
console.log("profile", profile);
localStorage.setItem("profile_setup_stage", "skipped");
navigate("/addfederation");
// navigate("/addfederation");
navigate("/");
setSkipping(false);
}

Expand All @@ -46,7 +47,8 @@ export function NewProfile() {
);
console.log("profile", profile);
localStorage.setItem("profile_setup_stage", "saved");
navigate("/addfederation");
// navigate("/addfederation");
navigate("/");
} catch (e) {
console.error(e);
}
Expand Down
Loading