From 72f91de96f21eaec36117bbddda63373b102456f Mon Sep 17 00:00:00 2001 From: AlexeyAdoniev Date: Thu, 2 Nov 2023 16:33:49 +0200 Subject: [PATCH] socketUrlPath --- src/App.tsx | 13 +++++-------- src/constants.ts | 5 +++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 4c0d698f..2dac1da3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,18 +9,15 @@ import io from "socket.io-client"; import { useEffect, useState } from "react"; import "./components/ChainModal/Chain.css"; -import { socketUrl, url } from "./constants"; +import { socketUrlPath, url, socketUrl } from "./constants"; import { handleGoogleAnalyticsPageView } from "./GA4"; const socket = io(socketUrl, { - path: "/socket.io", + path: socketUrlPath || "/socket.io", }); -/*const scraperSocket = io(scraperSocketUrl, { - path: "/socket.io", -}); -const destScraperSocket = io(destScraperSocketUrl, { - path: "/socket.io", -});*/ +setTimeout(() => { + console.log(socket.connected); +}, 6000); interface AppData { totalTx: number; totalWallets: number; diff --git a/src/constants.ts b/src/constants.ts index 99b21dd3..73543fe4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -251,8 +251,9 @@ export const chains = [ }, ]; -export const url = "https://dev-explorer-api.herokuapp.com/"; -export const socketUrl = "wss://dev-explorer-api.herokuapp.com/"; +export const url = "https://explorer-app.xp.network/"; +export const socketUrl = "https://explorer-app.xp.network"; +export const socketUrlPath = "/ws"; //export const scraperSocketUrl = "wss://explorer-scraper.herokuapp.com/"; //export const destScraperSocketUrl = "wss://dest-scraper.herokuapp.com/";