mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-25 18:04:26 +01:00
Bring back reset router
This commit is contained in:
committed by
Paul Miller
parent
68bd5f8d3d
commit
8fbda8856f
@@ -19,6 +19,7 @@ import { Network } from "~/logic/mutinyWalletSetup";
|
||||
import { ExternalLink } from "./layout/ExternalLink";
|
||||
import { Restart } from "./Restart";
|
||||
import { ResyncOnchain } from "./ResyncOnchain";
|
||||
import { ResetRouter } from "./ResetRouter";
|
||||
import { MiniStringShower } from "./DetailsModal";
|
||||
|
||||
// TODO: hopefully I don't have to maintain this type forever but I don't know how to pass it around otherwise
|
||||
@@ -428,6 +429,8 @@ export default function KitchenSink() {
|
||||
<Hr />
|
||||
<ResyncOnchain />
|
||||
<Hr />
|
||||
<ResetRouter />
|
||||
<Hr />
|
||||
<Restart />
|
||||
<Hr />
|
||||
</>
|
||||
|
||||
27
src/components/ResetRouter.tsx
Normal file
27
src/components/ResetRouter.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Button, InnerCard, NiceP, VStack } from "~/components/layout";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
|
||||
export function ResetRouter() {
|
||||
const [state, _] = useMegaStore();
|
||||
|
||||
async function reset() {
|
||||
try {
|
||||
await state.mutiny_wallet?.reset_router();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<InnerCard>
|
||||
<VStack>
|
||||
<NiceP>
|
||||
Failing to make payments? Try resetting the lightning router.
|
||||
</NiceP>
|
||||
<Button intent="red" onClick={reset}>
|
||||
Reset Router
|
||||
</Button>
|
||||
</VStack>
|
||||
</InnerCard>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user