mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-14 10:44:20 +01:00
Skip setup is flag set
This commit is contained in:
committed by
Tony Giorgio
parent
183449eb13
commit
936f66f454
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user