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

Remove swap functionality for now #1074

Merged
merged 1 commit into from
Apr 18, 2024
Merged
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
27 changes: 2 additions & 25 deletions src/components/BalanceBox.tsx
TonyGiorgio marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { A, useNavigate } from "@solidjs/router";
import { Shuffle, Users } from "lucide-solid";
import { useNavigate } from "@solidjs/router";
import { Users } from "lucide-solid";
import { Match, Show, Switch } from "solid-js";

import {
Expand Down Expand Up @@ -43,9 +43,6 @@ export function LoadingShimmer(props: { center?: boolean; small?: boolean }) {
);
}

const STYLE =
"px-2 py-1 rounded-xl text-sm flex gap-2 items-center font-semibold";

export function BalanceBox(props: { loading?: boolean; small?: boolean }) {
const [state, _actions] = useMegaStore();
const navigate = useNavigate();
Expand All @@ -56,9 +53,6 @@ export function BalanceBox(props: { loading?: boolean; small?: boolean }) {
(state.balance?.unconfirmed || 0n) +
(state.balance?.force_close || 0n);

const usableOnchain = () =>
(state.balance?.confirmed || 0n) + (state.balance?.unconfirmed || 0n);

return (
<VStack>
<Switch>
Expand Down Expand Up @@ -90,16 +84,6 @@ export function BalanceBox(props: { loading?: boolean; small?: boolean }) {
/>
</div>
</div>

<Show
when={state.balance?.federation || 0n > 0n}
>
<div class="self-end justify-self-end">
<A href="/swaplightning" class={STYLE}>
<Shuffle class="h-6 w-6" />
</A>
</div>
</Show>
</div>
</Show>
</FancyCard>
Expand Down Expand Up @@ -184,13 +168,6 @@ export function BalanceBox(props: { loading?: boolean; small?: boolean }) {
<Show when={state.balance?.unconfirmed === 0n}>
<div />
</Show>
<Show when={usableOnchain() > 0n}>
<div class="self-end justify-self-end">
<A href="/swap" class={STYLE}>
<Shuffle class="h-6 w-6" />
</A>
</div>
</Show>
</div>
</div>
</Show>
Expand Down
Loading