-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lightning sweep functionality to fedimint
- Loading branch information
1 parent
6cd7708
commit f8f0103
Showing
8 changed files
with
358 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { MutinyInvoice } from "@mutinywallet/mutiny-wasm"; | ||
import { A, useNavigate, useSearchParams } from "@solidjs/router"; | ||
import { | ||
createEffect, | ||
createMemo, | ||
createResource, | ||
createSignal, | ||
JSX, | ||
Match, | ||
onMount, | ||
Show, | ||
Suspense, | ||
Switch | ||
} from "solid-js"; | ||
|
||
import bolt from "~/assets/icons/bolt.svg"; | ||
import chain from "~/assets/icons/chain.svg"; | ||
import close from "~/assets/icons/close.svg"; | ||
import { | ||
ActivityDetailsModal, | ||
AmountEditable, | ||
AmountFiat, | ||
AmountSats, | ||
BackPop, | ||
Button, | ||
DefaultMain, | ||
Fee, | ||
FeeDisplay, | ||
HackActivityType, | ||
InfoBox, | ||
LabelCircle, | ||
LoadingShimmer, | ||
MegaCheck, | ||
MegaClock, | ||
MegaEx, | ||
MethodChoice, | ||
MutinyWalletGuard, | ||
NavBar, | ||
showToast, | ||
SimpleInput, | ||
SmallHeader, | ||
StringShower, | ||
SuccessModal, | ||
UnstyledBackPop, | ||
VStack | ||
} from "~/components"; | ||
import { useI18n } from "~/i18n/context"; | ||
import { ParsedParams } from "~/logic/waila"; | ||
import { useMegaStore } from "~/state/megaStore"; | ||
import { eify, vibrateSuccess } from "~/utils"; | ||
|
||
export function Failure(props: { reason: string }) { | ||
const i18n = useI18n(); | ||
|
||
return ( | ||
<Switch> | ||
<Match when={props.reason === "Payment timed out."}> | ||
<MegaClock /> | ||
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl"> | ||
{i18n.t("send.payment_pending")} | ||
</h1> | ||
<InfoBox accent="white"> | ||
{i18n.t("send.payment_pending_description")} | ||
</InfoBox> | ||
</Match> | ||
<Match | ||
when={props.reason === "Channel reserve amount is too high."} | ||
> | ||
<MegaEx /> | ||
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl"> | ||
{i18n.t("send.error_channel_reserves")} | ||
</h1> | ||
<InfoBox accent="white"> | ||
{i18n.t("send.error_channel_reserves_explained")}{" "} | ||
<A href="/settings/channels">{i18n.t("common.why")}</A> | ||
</InfoBox> | ||
</Match> | ||
<Match when={true}> | ||
<MegaEx /> | ||
<h1 class="mb-2 mt-4 w-full text-center text-2xl font-semibold md:text-3xl"> | ||
{props.reason} | ||
</h1> | ||
</Match> | ||
</Switch> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.