diff --git a/apps/explorer-e2e/.env b/apps/explorer-e2e/.env index 3cd032624..5254f0d9d 100644 --- a/apps/explorer-e2e/.env +++ b/apps/explorer-e2e/.env @@ -2,7 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-exp NX_TENDERMINT_URL=http://localhost:26617 NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket NX_VEGA_URL=http://localhost:3028/query -NX_VEGA_ENV=LOCAL +NX_VEGA_ENV=CUSTOM NX_VEGA_REST=http://localhost:3029 CYPRESS_VEGA_TENDERMINT_URL=http://localhost:26617 diff --git a/apps/explorer-e2e/cypress.json b/apps/explorer-e2e/cypress.json index fb459aadd..56edbee7e 100644 --- a/apps/explorer-e2e/cypress.json +++ b/apps/explorer-e2e/cypress.json @@ -14,7 +14,7 @@ "screenshotsFolder": "../../dist/cypress/apps/explorer-e2e/screenshots", "chromeWebSecurity": false, "env": { - "environment": "local", + "environment": "CUSTOM", "tsConfig": "tsconfig.json", "TAGS": "not @todo and not @ignore and not @manual" } diff --git a/apps/explorer-e2e/src/integration/transactions-page.feature b/apps/explorer-e2e/src/integration/transactions-page.feature index 397e45e01..0eb3bc1a2 100644 --- a/apps/explorer-e2e/src/integration/transactions-page.feature +++ b/apps/explorer-e2e/src/integration/transactions-page.feature @@ -5,12 +5,14 @@ Feature: Transactions Page When I navigate to the transactions page Then transactions page is correctly displayed + @ignore Scenario: Navigate to transaction details page Given I am on the homepage When I navigate to the transactions page And I click on the top transaction Then transaction details are displayed + @ignore Scenario: Navigate to transactions page using mobile Given I am on mobile and open the toggle menu When I navigate to the transactions page diff --git a/apps/explorer/.env b/apps/explorer/.env index f71bdbc25..6715926fc 100644 --- a/apps/explorer/.env +++ b/apps/explorer/.env @@ -2,7 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-exp NX_TENDERMINT_URL=http://localhost:26617 NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket NX_VEGA_URL=http://localhost:3028/query -NX_VEGA_ENV=LOCAL +NX_VEGA_ENV=CUSTOM NX_VEGA_REST=http://localhost:3029 NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api diff --git a/apps/explorer/.env.capsule b/apps/explorer/.env.capsule index ed2cf672b..4fa0a1a12 100644 --- a/apps/explorer/.env.capsule +++ b/apps/explorer/.env.capsule @@ -4,7 +4,7 @@ NX_TENDERMINT_URL=http://localhost:26617 NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket NX_VEGA_URL=http://localhost:3028/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' -NX_VEGA_ENV=LOCAL +NX_VEGA_ENV=CUSTOM NX_VEGA_REST=http://localhost:3029 # App flags diff --git a/apps/explorer/.env.devnet b/apps/explorer/.env.devnet index 598dd92e4..c5c245622 100644 --- a/apps/explorer/.env.devnet +++ b/apps/explorer/.env.devnet @@ -2,6 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api NX_TENDERMINT_URL=https://n04.d.vega.xyz/tm NX_TENDERMINT_WEBSOCKET_URL=wss://n04.d.vega.xyz/tm/websocket +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json NX_VEGA_URL=https://n04.d.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' NX_VEGA_ENV=DEVNET diff --git a/apps/explorer/.env.mainnet b/apps/explorer/.env.mainnet index 8215f8db1..721af8681 100644 --- a/apps/explorer/.env.mainnet +++ b/apps/explorer/.env.mainnet @@ -2,6 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api NX_TENDERMINT_URL=https://mainnet-observer-proxy01.ops.vega.xyz/ NX_TENDERMINT_WEBSOCKET_URL=wss://mainnet-observer-proxy01.ops.vega.xyz/websocket +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json NX_VEGA_URL=https://api.token.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' NX_VEGA_ENV=MAINNET diff --git a/apps/explorer/.env.stagnet1 b/apps/explorer/.env.stagnet1 index e8073baa7..7a7359f9d 100644 --- a/apps/explorer/.env.stagnet1 +++ b/apps/explorer/.env.stagnet1 @@ -2,6 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api NX_TENDERMINT_URL=https://n03.s.vega.xyz/tm NX_TENDERMINT_WEBSOCKET_URL=wss://n03.s.vega.xyz/tm/websocket +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet1-network.json NX_VEGA_URL=https://n03.s.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' NX_VEGA_ENV=STAGNET diff --git a/apps/explorer/.env.stagnet2 b/apps/explorer/.env.stagnet2 index 991030406..38baff594 100644 --- a/apps/explorer/.env.stagnet2 +++ b/apps/explorer/.env.stagnet2 @@ -2,6 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api NX_TENDERMINT_URL=https://n03.stagnet2.vega.xyz/tm NX_TENDERMINT_WEBSOCKET_URL=wss://n03.stagnet2.vega.xyz/tm/websocket +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet2-network.json NX_VEGA_URL=https://n03.stagnet2.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' NX_VEGA_ENV=STAGNET2 diff --git a/apps/explorer/.env.testnet b/apps/explorer/.env.testnet index a6aca9546..750098142 100644 --- a/apps/explorer/.env.testnet +++ b/apps/explorer/.env.testnet @@ -2,6 +2,7 @@ NX_CHAIN_EXPLORER_URL=https://explorer.vega.trading/.netlify/functions/chain-explorer-api NX_TENDERMINT_URL=https://lb.testnet.vega.xyz/tm NX_TENDERMINT_WEBSOCKET_URL=wss://lb.testnet.vega.xyz/tm/websocket +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json NX_VEGA_URL=https://lb.testnet.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz"}' NX_VEGA_ENV=TESTNET diff --git a/apps/explorer/src/app/app.tsx b/apps/explorer/src/app/app.tsx index 5d025872f..088ae5594 100644 --- a/apps/explorer/src/app/app.tsx +++ b/apps/explorer/src/app/app.tsx @@ -1,13 +1,11 @@ -import { useState, useEffect, useMemo } from 'react'; +import { useState, useEffect } from 'react'; import { useLocation } from 'react-router-dom'; -import { ApolloProvider } from '@apollo/client'; import { ThemeContext, useThemeSwitcher } from '@vegaprotocol/react-helpers'; -import { EnvironmentProvider } from '@vegaprotocol/network-switcher'; +import { EnvironmentProvider, NetworkLoader } from '@vegaprotocol/environment'; import { createClient } from './lib/apollo-client'; import { Nav } from './components/nav'; import { Header } from './components/header'; import { Main } from './components/main'; -import { DATA_SOURCES } from './config'; import { TendermintWebsocketProvider } from './contexts/websocket/tendermint-websocket-provider'; function App() { @@ -20,13 +18,11 @@ function App() { setMenuOpen(false); }, [location]); - const client = useMemo(() => createClient(DATA_SOURCES.dataNodeUrl), []); - return ( - +
-
+
diff --git a/apps/explorer/src/app/components/nav/index.tsx b/apps/explorer/src/app/components/nav/index.tsx index ce26c4501..0196b41c6 100644 --- a/apps/explorer/src/app/components/nav/index.tsx +++ b/apps/explorer/src/app/components/nav/index.tsx @@ -1,5 +1,6 @@ import { NavLink } from 'react-router-dom'; import routerConfig from '../../routes/router-config'; +import classnames from 'classnames'; interface NavProps { menuOpen: boolean; @@ -9,18 +10,29 @@ export const Nav = ({ menuOpen }: NavProps) => { return (