Merge pull request #120 from MutinyWallet/stop-nodes

Stop nodes in settings
This commit is contained in:
Tony Giorgio
2023-05-12 21:31:19 -05:00
committed by GitHub
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import { Button, Card, NiceP, VStack } from "~/components/layout";
import { useMegaStore } from "~/state/megaStore";
import { downloadTextFile } from "~/utils/download";
export function Restart() {
const [state, _] = useMegaStore()
async function handleStop() {
const result = await state.mutiny_wallet?.stop()
}
return (
<Card>
<VStack>
<NiceP>Something *extra* screwy going on? Stop the nodes!</NiceP>
<Button onClick={handleStop}>Stop</Button>
</VStack>
</Card>
)
}

View File

@@ -1,6 +1,7 @@
import { ButtonLink, DefaultMain, LargeHeader, MutinyWalletGuard, SafeArea, VStack } from "~/components/layout";
import { BackLink } from "~/components/layout/BackLink";
import { Logs } from "~/components/Logs";
import { Restart } from "~/components/Restart";
import NavBar from "~/components/NavBar";
import { SeedWords } from "~/components/SeedWords";
import { SettingsStringsEditor } from "~/components/SettingsStringsEditor";
@@ -22,6 +23,7 @@ export default function Settings() {
</VStack>
<SettingsStringsEditor />
<Logs />
<Restart />
<ButtonLink href="/admin">"I know what I'm doing"</ButtonLink>
</VStack>
</DefaultMain>
@@ -29,4 +31,4 @@ export default function Settings() {
</SafeArea>
</MutinyWalletGuard>
)
}
}