Another double init check

This commit is contained in:
benthecarman
2023-11-10 01:06:40 -06:00
committed by benthecarman
parent ff93a0e49f
commit de84a9de3b
2 changed files with 13 additions and 0 deletions

View File

@@ -186,6 +186,9 @@ export function SetupErrorDisplay(props: { initialError: Error }) {
<NiceP>
{i18n.t("error.on_boot.loading_failed.description")}
</NiceP>
<Button onClick={() => window.location.reload()}>
Reload
</Button>
<NiceP>
{i18n.t(
"error.on_boot.loading_failed.repair_options"

View File

@@ -149,6 +149,16 @@ export const Provider: ParentComponent = (props) => {
throw state.setup_error;
}
// If there's already a mutiny wallet in state abort!
if (state.mutiny_wallet) {
setState({
setup_error: new Error(
"Existing Mutiny Wallet already running, aborting setup"
)
});
return;
}
setState({
wallet_loading: true,
load_stage: "checking_double_init"