Skip to content

Commit

Permalink
fedi swap edit and "stages"
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul committed Feb 5, 2024
1 parent 5d0062a commit 93e2933
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 177 deletions.
51 changes: 3 additions & 48 deletions src/components/Failure.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,8 @@
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 { A } from "@solidjs/router";
import { Match, 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 { InfoBox, MegaClock, MegaEx } 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();
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,10 @@ export default {
swap_lightning: {
insufficient_funds: "You don't have enough funds to swap to lightning",
header: "Swap to Lightning",
header_preview: "Preview Swap",
initiated: "Swap Initiated",
too_small:
"Invalid amount entered. You need to swap at least 100k sats.",
sats_added: "+{{amount}} sats will be added to your Lightning balance",
sats_fee: "+{{amount}} sats fee",
confirm_swap: "Confirm Swap",
Expand Down
8 changes: 3 additions & 5 deletions src/routes/Send.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MutinyInvoice, TagItem } from "@mutinywallet/mutiny-wasm";
import { A, useNavigate, useSearchParams } from "@solidjs/router";
import { useNavigate, useSearchParams } from "@solidjs/router";
import {
createEffect,
createMemo,
Expand Down Expand Up @@ -33,8 +33,6 @@ import {
LabelCircle,
LoadingShimmer,
MegaCheck,
MegaClock,
MegaEx,
MethodChoice,
MutinyWalletGuard,
NavBar,
Expand Down Expand Up @@ -236,8 +234,8 @@ export function Send() {
? sentDetails()?.txid
: undefined
: sentDetails()
? sentDetails()?.payment_hash
: undefined;
? sentDetails()?.payment_hash
: undefined;
const kind = sentDetails()?.txid ? "OnChain" : "Lightning";

console.log("Opening details modal: ", paymentTxId, kind);
Expand Down
Loading

0 comments on commit 93e2933

Please sign in to comment.