Skip to content

Commit

Permalink
Drop MutinyWallet before restore
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGiorgio authored and futurepaul committed Dec 21, 2023
1 parent 4f9f7eb commit b41b2e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@kobalte/core": "^0.9.8",
"@kobalte/tailwindcss": "^0.5.0",
"@modular-forms/solid": "^0.18.1",
"@mutinywallet/mutiny-wasm": "0.5.0-rc1",
"@mutinywallet/mutiny-wasm": "0.5.0-rc2",
"@mutinywallet/waila-wasm": "^0.2.6",
"@solid-primitives/upload": "^0.0.111",
"@solid-primitives/websocket": "^1.2.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/routes/settings/Restore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function TwelveWordsEntry() {
console.log("Mutiny wallet loaded, stopping");
try {
await state.mutiny_wallet.stop();
actions.dropMutinyWallet();
} catch (e) {
console.error(e);
}
Expand Down
4 changes: 4 additions & 0 deletions src/state/megaStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export type MegaStore = [
setBetaWarned(): void;
setTestFlightPromptDismissed(): void;
toggleHodl(): void;
dropMutinyWallet(): void;
}
];

Expand Down Expand Up @@ -404,6 +405,9 @@ export const Provider: ParentComponent = (props) => {
const should_zap_hodl = !state.should_zap_hodl;
localStorage.setItem("should_zap_hodl", should_zap_hodl.toString());
setState({ should_zap_hodl });
},
dropMutinyWallet() {
setState({ mutiny_wallet: undefined });
}
};

Expand Down

0 comments on commit b41b2e3

Please sign in to comment.