c576037b58
* 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 |
||
---|---|---|
.. | ||
assets | ||
client-pages | ||
components | ||
lib | ||
pages | ||
public | ||
stores | ||
.env | ||
.env.devnet | ||
.env.mainnet | ||
.env.sandbox | ||
.env.stagnet1 | ||
.env.stagnet3 | ||
.env.testnet | ||
.eslintrc.json | ||
client.graphql | ||
index.d.ts | ||
jest.config.ts | ||
netlify.toml | ||
next-env.d.ts | ||
next.config.js | ||
postcss.config.js | ||
project.json | ||
README.md | ||
sentry.client.config.js | ||
sentry.server.config.js | ||
setup-tests.ts | ||
tailwind.config.js | ||
tsconfig.json | ||
tsconfig.spec.json |
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