mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-03 05:24:36 +01:00
Add button for resync wallet
This commit is contained in:
committed by
Paul Miller
parent
c1b024baf6
commit
10e569654d
@@ -38,7 +38,7 @@
|
||||
"@kobalte/core": "^0.9.6",
|
||||
"@kobalte/tailwindcss": "^0.5.0",
|
||||
"@modular-forms/solid": "^0.13.2",
|
||||
"@mutinywallet/mutiny-wasm": "0.3.8",
|
||||
"@mutinywallet/mutiny-wasm": "0.3.9",
|
||||
"@mutinywallet/waila-wasm": "^0.2.0",
|
||||
"@solid-primitives/upload": "^0.0.111",
|
||||
"@solidjs/meta": "^0.28.5",
|
||||
|
||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -11,8 +11,8 @@ dependencies:
|
||||
specifier: ^0.13.2
|
||||
version: 0.13.2(solid-js@1.7.5)
|
||||
'@mutinywallet/mutiny-wasm':
|
||||
specifier: 0.3.8
|
||||
version: 0.3.8
|
||||
specifier: 0.3.9
|
||||
version: 0.3.9
|
||||
'@mutinywallet/waila-wasm':
|
||||
specifier: ^0.2.0
|
||||
version: 0.2.0
|
||||
@@ -1688,8 +1688,8 @@ packages:
|
||||
solid-js: 1.7.5
|
||||
dev: false
|
||||
|
||||
/@mutinywallet/mutiny-wasm@0.3.8:
|
||||
resolution: {integrity: sha512-LM7CR3mL4vi2w1M2iUFuPyyorNVtoVMx5I7b8AjxJtNCINmid9W19A7xich0j0gegGi9o3D3VI5rflEc5BSzKg==}
|
||||
/@mutinywallet/mutiny-wasm@0.3.9:
|
||||
resolution: {integrity: sha512-BvjBSJsCu3htLoXNZTp68J3n6wvsPbzzJkqQ5Vq3zn+iqt2WbcvcCQ7P8/W28jLCvaQFqfL/vZrA7nULGO+KqA==}
|
||||
dev: false
|
||||
|
||||
/@mutinywallet/waila-wasm@0.2.0:
|
||||
|
||||
@@ -13,6 +13,7 @@ import { Network } from "~/logic/mutinyWalletSetup";
|
||||
import { ExternalLink } from "./layout/ExternalLink";
|
||||
import { Logs } from "./Logs";
|
||||
import { Restart } from "./Restart";
|
||||
import { ResyncOnchain } from "./ResyncOnchain";
|
||||
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
|
||||
@@ -437,6 +438,8 @@ export default function KitchenSink() {
|
||||
<Hr />
|
||||
<LnUrlAuth />
|
||||
<Hr />
|
||||
<ResyncOnchain />
|
||||
<Hr />
|
||||
<Restart />
|
||||
<Hr />
|
||||
<ImportExport />
|
||||
|
||||
27
src/components/ResyncOnchain.tsx
Normal file
27
src/components/ResyncOnchain.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import {Button, InnerCard, NiceP, VStack} from "~/components/layout";
|
||||
import {useMegaStore} from "~/state/megaStore";
|
||||
|
||||
export function ResyncOnchain() {
|
||||
const [state, _] = useMegaStore();
|
||||
|
||||
async function reset() {
|
||||
try {
|
||||
await state.mutiny_wallet?.reset_onchain_tracker();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<InnerCard>
|
||||
<VStack>
|
||||
<NiceP>
|
||||
On-chain balance seems incorrect? Try re-syncing the on-chain wallet.
|
||||
</NiceP>
|
||||
<Button intent="red" onClick={reset}>
|
||||
Resync wallet
|
||||
</Button>
|
||||
</VStack>
|
||||
</InnerCard>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user