vega-frontend-monorepo/apps/trading
Matthew Russell c576037b58
chore(#1873): trading hash router (#1921)
* chore: make liquidity page client side only

* chore: switch to hash based router

* chore: add index files for each page

* chore: tidy up _app

* chore: convert to use useRoutes

* fix: active state with react-router NavLink

* feat: add routes enum

* chore: restrict link and router imports from next

* chore: update testing navigation to use hash routes

* fix: typoe in eslint rule message

* chore: remove unnecessary getInitialProps function definition

* chore: wrap tests with memory router

* chore: delete unused index.page file

* chore: update suspense fallback state

* chore: add comment for link component span usage, update link to use toolkit styles

* chore: fix lint issues

* chore: delete client deposit page

* chore: revert title in _app so title gets set correctly without rerender

* revert: removal of deposit page so deposit e2e tests still pass

* chore: move client router to index page so valid status codes are still sent

* fix: wrong route path for markets page, cypress tests
2022-11-08 08:23:38 +01:00
..
assets Feat/725 network header styles (#1893) 2022-10-28 16:13:14 +01:00
client-pages chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
components chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
lib Feat/1660 validate available margin (#1860) 2022-10-27 20:12:03 +02:00
pages chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
public Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
stores market page: break down components to smaller chunks for better performance (#1726) 2022-10-14 17:42:53 +02:00
.env fix: change n07 to n06 (#1751) 2022-10-14 16:56:17 +02:00
.env.devnet chore: add missing env vars and alphabeticise them (#1736) 2022-10-12 14:28:55 -07:00
.env.mainnet chore: add missing env vars and alphabeticise them (#1736) 2022-10-12 14:28:55 -07:00
.env.sandbox fix: #1826 fix vega docs links (#1967) 2022-11-07 18:12:40 +00:00
.env.stagnet1 chore: add missing env vars and alphabeticise them (#1736) 2022-10-12 14:28:55 -07:00
.env.stagnet3 chore: add missing env vars and alphabeticise them (#1736) 2022-10-12 14:28:55 -07:00
.env.testnet fix: use n08 in .env.testnet 2022-10-31 10:43:02 +00:00
.eslintrc.json chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
client.graphql Feat/104 withdraws (#263) 2022-04-26 19:51:39 -07:00
index.d.ts Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
jest.config.ts feat(#927) design update (#1201) 2022-08-30 21:35:46 -07:00
netlify.toml chore: package.json clean-up (#1030) 2022-08-15 13:57:47 +01:00
next-env.d.ts Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
next.config.js chore: revert "always prefix static assets with dot (#1615)" 2022-10-04 14:55:40 -07:00
postcss.config.js Extract tailwindcss config to libs 2022-02-23 16:29:07 -08:00
project.json chore: add build-spec targets and execute on affected apps and libs on CI (#1745) 2022-10-25 09:41:16 +02:00
README.md chore: remove stagnet1, fix env vars for api endpoints (#1163) 2022-08-25 17:07:27 -07:00
sentry.client.config.js Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
sentry.server.config.js Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
setup-tests.ts Feat/375: Risk notice dialog (#1096) 2022-09-02 15:53:38 +01:00
tailwind.config.js chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
tsconfig.json feat(#927) design update (#1201) 2022-08-30 21:35:46 -07:00
tsconfig.spec.json chore: add build-spec targets and execute on affected apps and libs on CI (#1745) 2022-10-25 09:41:16 +02:00

Trading

Development

First copy the configuration of the application you are starting:

cp .env.[environment] .env.local

Starting the app:

yarn nx serve explorer

Configuration

Example configurations are provided here:

For convenience, you can boot the app injecting one of the configurations above by running:

yarn nx run token:serve --env={env} # e.g. stagnet3

There are a few different configuration options offered for this app:

The network configuration for the app

Flag Purpose
NX_VEGA_ENV The name of the currently connected vega environment
NX_VEGA_CONFIG_URL The network configuration for the app
NX_VEGA_URL The GraphQL query endpoint of a Vega data node
NX_ETHEREUM_PROVIDER_URL The Ethereum Provider URL for getting data from the Ethereum network, for example Infura or a local node
NX_ETHERSCAN_URL The Etherscan URL to link Ethereum transactions to

Testing

To run the minimal set of unit tests, run the following:

yarn nx test trading

To run the UI automation tests with a mocked API, run:

yarn nx run trading-e2e:e2e