Skip setup is flag set

This commit is contained in:
benthecarman
2024-04-10 16:45:45 -05:00
committed by Tony Giorgio
parent 183449eb13
commit 936f66f454
2 changed files with 14 additions and 2 deletions

View File

@@ -321,7 +321,7 @@ export async function setupMutinyWallet(
network,
esplora,
rgs,
lsp,
shouldUseLSPS ? undefined : lsp,
shouldUseLSPS ? lsps_connection_string : undefined,
shouldUseLSPS ? lsps_token : undefined,
auth,

View File

@@ -22,6 +22,7 @@ import {
getSettings,
initializeWasm,
MutinyWalletSettingStrings,
setSettings,
setupMutinyWallet
} from "~/logic/mutinyWalletSetup";
import { ParsedParams, toParsedParams } from "~/logic/waila";
@@ -194,6 +195,15 @@ export const Provider: ParentComponent = (props) => {
const settings = await getSettings();
setState({ load_stage: "setup" });
// handle lsp settings
if (searchParams.lsps) {
settings.lsp = "";
settings.lsps_connection_string = searchParams.lsps;
settings.lsps_token = searchParams.token;
await setSettings(settings);
}
const mutinyWallet = await setupMutinyWallet(
settings,
password,
@@ -509,6 +519,8 @@ export const Provider: ParentComponent = (props) => {
};
}
const [params, _] = useSearchParams();
onMount(async () => {
await checkForExistingTab();
if (state.existing_tab_detected) {
@@ -528,7 +540,7 @@ export const Provider: ParentComponent = (props) => {
setState({ load_stage: "checking_for_existing_wallet" });
const existing = await MutinyWallet.has_node_manager();
if (!existing) {
if (!existing && !params.skip_setup) {
navigate("/setup");
return;
}