vega-frontend-monorepo/libs/network-switcher
botond ecda46caa5
Feat/6 Network Switcher (#502)
* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* feat: add network-switcher lib

* feat: add env variables for some deployed app urls

* feat: add network processing to environment hoook

* refactor: network handling

* refactor: remove dialog from provider and add env setter

* feat: add network switcher dialog to the trading app

* refactor: add network redirect to dialog connect callback

* fix: lint

* fix: jsonify env variable for possible networks

* fix: add formatter file

* fix: assign correct global state to network swicther

* fix: failing tests from UI changes

* fix: lint

* fix: lint

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Dexter <dexter.edwards93@gmail.com>
2022-06-10 10:15:38 +01:00
..
src Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
.babelrc Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
.eslintrc.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
jest.config.js Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
package.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
project.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
README.md Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
tsconfig.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
tsconfig.lib.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
tsconfig.spec.json Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00

network-switcher

This library was generated with Nx.

Prerequisites

Two environment variables need to be present for any app consuming this library.

NX_VEGA_ENV is the name of the environment.

NX_VEGA_REST is the REST endpoint for the environment.

For examples, see Block Explorer's .env files here

Running unit tests

Run nx test network-switcher to execute the unit tests via Jest.