afeb772702
* feat: add node swicther * chore: remove hook form from node switcher * feat: generate apollo types and add tests * fix: format * fix: types * fix: remove redundant wrapper * fix: layout styles * fix: add controlled value to radio group * fix: flaky node hook test * feat: add custom input for node and more tests * feat: wip refactor config hook to run on init * fix: dont open node switcher on init * fix: lint * fix: lint * fix: cache key error * fix: format * fix: lint * feat: validate connected node on init WIP * chore: refactor useconfig and usenodes * fix: revert custom node branch changes * feat: fix config loading errors and custom node handling * feat: add test for nodes init * fix: env error states * fix: add more tests * fix: format * fix: lint and format * fix: mock type in test * fix: clean up queries * fix: node block heights * fix: make git variables optional * fix: dialog width on lg screens * feat: improve mobile looks * fix: format * fix: remove commented out styles * fix: use node data url instead of key * fix: clean up node switcher dialog props * fix: add missing title and subtitle for dialog * fix: show confiug load errors |
||
---|---|---|
.. | ||
assets | ||
components | ||
lib | ||
pages | ||
public | ||
specs | ||
stores | ||
.env | ||
.env.devnet | ||
.env.mainnet | ||
.env.stagnet1 | ||
.env.stagnet2 | ||
.env.testnet | ||
.eslintrc.json | ||
client.graphql | ||
index.d.ts | ||
jest.config.js | ||
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. stagnet1
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