diff --git a/src/Network/APIHandler.tsx b/src/Network/APIHandler.tsx index b9da298..17d46e7 100644 --- a/src/Network/APIHandler.tsx +++ b/src/Network/APIHandler.tsx @@ -45,6 +45,7 @@ export const getActiveSessionPin = (): string => { export const sessionBaseUrl = (v2: boolean = false) => { const sessionId = getActiveSessionPin(); let addr = store.getState().connection.backendAddress; + console.log("addr: ", addr); let apiUrl = `${addr}/api`; if (v2) { @@ -57,6 +58,7 @@ export const sessionBaseUrl = (v2: boolean = false) => { export const currentNodeUrl = (v2: boolean = false) => { if (isLocalVersion()) { let addr = store.getState().connection.backendAddress; + console.log("1addr: ", addr); return `${addr}/debug/diag`; } else { const baseUrl = sessionBaseUrl(v2); diff --git a/src/app/store/connectionSlice.ts b/src/app/store/connectionSlice.ts index 96187a6..8fa0442 100644 --- a/src/app/store/connectionSlice.ts +++ b/src/app/store/connectionSlice.ts @@ -19,7 +19,6 @@ const initialState: ConnectionState = { isConnectedToInternet: true, isConnectedToNode: true, nodeConnectionType: NodeConnectionType.Unknown, - //backendAddress: "http://localhost:8080" backendAddress: window.location.origin }; @@ -37,6 +36,7 @@ export const connectionSlice = createSlice({ state.nodeConnectionType = action.payload; }, setBackendAddress: (state, action: PayloadAction) => { + console.log("Setting backend address to: ", action.payload); state.backendAddress = action.payload; }, resetConectionState: () => initialState