vega-frontend-monorepo/apps/trading
m.ray 5c038690c3
fix: filter rejected markets, order when suspended, remove market state from header, show continuous trading (#761)
* fix: #603 filter out rejected markets & dialog lg width

* fix: #609 show trading mode Continuous Trading and hide market state

* fix: #656 modify order validation to trade when suspended

* fix: #656 fix use order validation tests

* fix: #656 format volume no

* fix: format volume with positionDecimalPlaces

* fix: tests don't need to be async

* fix: md:w-[720px] to prevent dialog overflow

* fix: add market state translations

* fix: imprt type validation props

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update libs/orders/src/lib/order-hooks/use-order-validation.spec.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update apps/trading/pages/markets/__generated__/Market.ts

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* fix: fix warning messages based on feedback

* fix: capitalize trading mode

* fix: capitalize trading mode

* fix: remove line 72 on markets.cy.ts

* fix: don't show trigger if unspecified

* fix: format last price and shrink 0 on warning icon

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: order sizes must be whole numbers for this market and input warning size 20

* fix: format market list

* fix: remove market state check from markets.cy.ts

* fix: remove market state check from markets.cy.ts

* fix: remove market state check from markets.cy.ts

* Revert "fix: remove market state check from markets.cy.ts"

This reverts commit c9ab55c98a.

* Revert "fix: remove market state check from markets.cy.ts"

This reverts commit be60e56d8a.

* fix: fix markets.cy.ts failing

* fix: fix markets.cy.ts failing

* fix: fix markets.cy.ts failing

* fix: remove extra test from markets.cy.ts

* fix: update extra test from markets.cy.ts

* fix: update extra test from markets.cy.ts

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-07-16 14:31:47 +01:00
..
assets Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
components Feat/718 integrate node validation (#741) 2022-07-15 12:00:57 +01:00
lib Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
pages fix: filter rejected markets, order when suspended, remove market state from header, show continuous trading (#761) 2022-07-16 14:31:47 +01:00
public Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
specs Feat/305 add console v2 first view screen (#424) 2022-05-23 13:21:54 +01:00
stores Feat/6 Network Switcher (#502) 2022-06-10 10:15:38 +01:00
.env fix: rename tradesPaged to tradesConnection (#770) 2022-07-15 12:12:20 +02:00
.env.devnet Feat/463 vega transaction component links to block explorer (#666) 2022-06-29 13:55:49 +01:00
.env.mainnet Feat/463 vega transaction component links to block explorer (#666) 2022-06-29 13:55:49 +01:00
.env.stagnet1 Feat/463 vega transaction component links to block explorer (#666) 2022-06-29 13:55:49 +01:00
.env.stagnet2 Feat/463 vega transaction component links to block explorer (#666) 2022-06-29 13:55:49 +01:00
.env.testnet fix: rename tradesPaged to tradesConnection (#770) 2022-07-15 12:12:20 +02:00
.eslintrc.json colocate querys with libs 2022-03-29 15:52:51 -07: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.js Feat/84 Order list (#89) 2022-03-23 12:08:10 -07: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 Task/33 add sentry to trading (#189) 2022-04-04 12:45:40 -07:00
postcss.config.js Extract tailwindcss config to libs 2022-02-23 16:29:07 -08:00
project.json Feat/675: Git info (#683) 2022-07-06 15:53:35 +00:00
README.md Feat/675: Git info (#683) 2022-07-06 15:53:35 +00: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/84 Order list (#89) 2022-03-23 12:08:10 -07:00
tailwind.config.js Fix/411 asset dropdown style (#535) 2022-06-10 16:12:51 -07:00
tsconfig.json feat(#175): ui-toolkit links (#453) 2022-05-31 17:30:02 -07:00
tsconfig.spec.json Fixes for workflows (#291) 2022-04-22 17:51:18 -07: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. 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