diff --git a/src/components/Activity.tsx b/src/components/Activity.tsx
index e25b944..2b3079e 100644
--- a/src/components/Activity.tsx
+++ b/src/components/Activity.tsx
@@ -1,7 +1,7 @@
import send from '~/assets/icons/send.svg';
import receive from '~/assets/icons/receive.svg';
-import { Card, Hr, LoadingSpinner, SmallAmount, SmallHeader, VStack } from './layout';
-import { For, JSX, Match, Show, Suspense, Switch, createMemo, createResource, createSignal } from 'solid-js';
+import { Card, LoadingSpinner, SmallAmount, SmallHeader, VStack } from './layout';
+import { For, Match, ParentComponent, Suspense, Switch, createMemo, createResource, createSignal } from 'solid-js';
import { useMegaStore } from '~/state/megaStore';
import { MutinyInvoice } from '@mutinywallet/mutiny-wasm';
import { prettyPrintTime } from '~/utils/prettyPrintTime';
@@ -34,7 +34,7 @@ type Utxo = {
is_spent: boolean
}
-function SubtleText(props: { children: any }) {
+const SubtleText: ParentComponent = (props) => {
return
{props.children}
}
@@ -50,7 +50,7 @@ function OnChainItem(props: { item: OnChainTx }) {
Mempool Link
- setOpen(!open())}>
+
setOpen(!open())}>
{isReceive() ?

:

}
Label Missing
@@ -76,7 +76,7 @@ function InvoiceItem(props: { item: MutinyInvoice }) {
return (
<>
-
setOpen(!open())}>
+
setOpen(!open())}>
{isSend() ?

:

}
Label Missing
@@ -101,7 +101,7 @@ function Utxo(props: { item: Utxo }) {
return (
<>
-
setOpen(!open())}>
+
setOpen(!open())}>
Label Missing
@@ -138,9 +138,9 @@ export function Activity() {
return utxos;
}
- const [transactions, { refetch: refetchTransactions }] = createResource(getTransactions);
- const [invoices, { refetch: refetchInvoices }] = createResource(getInvoices);
- const [utxos, { refetch: refetchUtxos }] = createResource(getUtXos);
+ const [transactions, { refetch: _refetchTransactions }] = createResource(getTransactions);
+ const [invoices, { refetch: _refetchInvoices }] = createResource(getInvoices);
+ const [utxos, { refetch: _refetchUtxos }] = createResource(getUtXos);
return (
diff --git a/src/components/Amount.tsx b/src/components/Amount.tsx
index 0705368..f869b67 100644
--- a/src/components/Amount.tsx
+++ b/src/components/Amount.tsx
@@ -1,4 +1,4 @@
-import { Show, createResource } from "solid-js"
+import { Show } from "solid-js"
import { useMegaStore } from "~/state/megaStore"
import { satsToUsd } from "~/utils/conversions"
diff --git a/src/components/AmountEditable.tsx b/src/components/AmountEditable.tsx
index c467a46..7f39aa4 100644
--- a/src/components/AmountEditable.tsx
+++ b/src/components/AmountEditable.tsx
@@ -1,4 +1,4 @@
-import { For, createMemo, createResource, createSignal } from 'solid-js';
+import { For, createMemo, createSignal } from 'solid-js';
import { Button } from '~/components/layout';
import { useMegaStore } from '~/state/megaStore';
import { satsToUsd } from '~/utils/conversions';
diff --git a/src/components/DeleteEverything.tsx b/src/components/DeleteEverything.tsx
new file mode 100644
index 0000000..15bc623
--- /dev/null
+++ b/src/components/DeleteEverything.tsx
@@ -0,0 +1,50 @@
+import { createSignal } from "solid-js";
+import { ConfirmDialog } from "~/components/Dialog";
+import { Button } from "~/components/layout";
+import { showToast } from "~/components/Toaster";
+
+export function deleteDb(name: string) {
+ const req = indexedDB.deleteDatabase(name);
+ req.onsuccess = function () {
+ console.log("Deleted database successfully");
+ showToast({ title: "Deleted", description: `Deleted "${name}" database successfully` })
+ };
+ req.onerror = function () {
+ console.error("Couldn't delete database");
+ showToast(new Error("Couldn't delete database"))
+ };
+ req.onblocked = function () {
+ console.error("Couldn't delete database due to the operation being blocked");
+ showToast(new Error("Couldn't delete database due to the operation being blocked"))
+ };
+}
+
+export function DeleteEverything() {
+ async function resetNode() {
+ setConfirmLoading(true);
+ deleteDb("gossip")
+ localStorage.clear();
+ showToast({ title: "Deleted", description: `Deleted all data` })
+ setConfirmOpen(false);
+ setConfirmLoading(false);
+ setTimeout(() => {
+ window.location.reload();
+ }, 1000);
+ }
+
+ async function confirmReset() {
+ setConfirmOpen(true);
+ }
+
+ const [confirmOpen, setConfirmOpen] = createSignal(false);
+ const [confirmLoading, setConfirmLoading] = createSignal(false);
+
+ return (
+ <>
+
+ setConfirmOpen(false)}>
+ This will delete your node's state. This can't be undone!
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/components/KitchenSink.tsx b/src/components/KitchenSink.tsx
index fab52bb..1fe29ac 100644
--- a/src/components/KitchenSink.tsx
+++ b/src/components/KitchenSink.tsx
@@ -3,11 +3,11 @@ import { Card, Hr, SmallHeader, Button, InnerCard, VStack } from "~/components/l
import PeerConnectModal from "~/components/PeerConnectModal";
import { For, Show, Suspense, createEffect, createResource, createSignal, onCleanup } from "solid-js";
import { MutinyChannel, MutinyPeer } from "@mutinywallet/mutiny-wasm";
-import { Collapsible, TextField, toaster } from "@kobalte/core";
+import { Collapsible, TextField } from "@kobalte/core";
import mempoolTxUrl from "~/utils/mempoolTxUrl";
import eify from "~/utils/eify";
import { ConfirmDialog } from "./Dialog";
-import { ToastItem, showToast } from "./Toaster";
+import { showToast } from "./Toaster";
// TODO: hopefully I don't have to maintain this type forever but I don't know how to pass it around otherwise
type RefetchPeersType = (info?: unknown) => MutinyPeer[] | Promise | null | undefined
diff --git a/src/components/SeedWords.tsx b/src/components/SeedWords.tsx
new file mode 100644
index 0000000..8c70b43
--- /dev/null
+++ b/src/components/SeedWords.tsx
@@ -0,0 +1,27 @@
+import { Match, Switch, createSignal } from "solid-js"
+
+export function SeedWords(props: { words: string }) {
+ const [shouldShow, setShouldShow] = createSignal(false)
+
+ function toggleShow() {
+ setShouldShow(!shouldShow())
+ }
+
+ return (
+
+
+
+ TAP TO REVEAL SEED WORDS
+
+
+
+
+
+
+
+
)
+}
\ No newline at end of file
diff --git a/src/components/SettingsStringsEditor.tsx b/src/components/SettingsStringsEditor.tsx
index 11c19b4..c201200 100644
--- a/src/components/SettingsStringsEditor.tsx
+++ b/src/components/SettingsStringsEditor.tsx
@@ -3,7 +3,7 @@ import { TextField } from '~/components/layout/TextField';
import { NodeManagerSettingStrings, getExistingSettings } from '~/logic/nodeManagerSetup';
import { Button } from '~/components/layout';
import { createSignal } from 'solid-js';
-import { deleteDb } from '~/routes/Settings';
+import { deleteDb } from '~/components/DeleteEverything';
import { showToast } from './Toaster';
import eify from '~/utils/eify';
import { ConfirmDialog } from "~/components/Dialog";
@@ -11,12 +11,12 @@ import { useMegaStore } from '~/state/megaStore';
export function SettingsStringsEditor() {
const existingSettings = getExistingSettings();
- const [settingsForm, { Form, Field, FieldArray }] = createForm({ initialValues: existingSettings });
+ const [_settingsForm, { Form, Field }] = createForm({ initialValues: existingSettings });
const [confirmOpen, setConfirmOpen] = createSignal(false);
const [settingsTemp, setSettingsTemp] = createSignal();
- const [state, actions] = useMegaStore();
+ const [_store, actions] = useMegaStore();
async function handleSubmit(values: NodeManagerSettingStrings) {
try {
@@ -56,7 +56,10 @@ export function SettingsStringsEditor() {
}
return