Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea04cabe97 | ||
|
|
bd46b568e5 | ||
|
|
e7591ea6c3 | ||
|
|
f1b19df77e | ||
|
|
92731daeef | ||
|
|
a0945be721 | ||
|
|
84e40ccb2b | ||
|
|
a868f6d2f5 | ||
|
|
8b83c51014 | ||
|
|
bf7aacf984 | ||
|
|
5183f2591b | ||
|
|
b3308439bd | ||
|
|
719d210219 | ||
|
|
f810a3a0b1 | ||
|
|
db19ee80ac | ||
|
|
45623f33c5 | ||
|
|
08e204fe31 | ||
|
|
81f7b0595e | ||
|
|
4ed0e3a056 | ||
|
|
47a84b4dac | ||
|
|
c540d4b17f | ||
|
|
f1fa3250a4 | ||
|
|
707c00def2 |
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
run-tests:
|
||||
name: run-tests
|
||||
runs-on: 8-cores
|
||||
runs-on: console-test
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
#----------------------------------------------
|
||||
@@ -33,15 +33,6 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cache-node-modules-
|
||||
#----------------------------------------------
|
||||
# setup node
|
||||
#----------------------------------------------
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
# https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions
|
||||
cache: yarn
|
||||
#----------------------------------------------
|
||||
# install deps if cache missing
|
||||
#----------------------------------------------
|
||||
- name: yarn install
|
||||
@@ -76,32 +67,6 @@ jobs:
|
||||
repository: vegaprotocol/console-test
|
||||
path: './console-test'
|
||||
#----------------------------------------------
|
||||
# set-up python
|
||||
#----------------------------------------------
|
||||
- name: Set up python
|
||||
id: setup-python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10.11'
|
||||
#----------------------------------------------
|
||||
# ----- install & configure poetry -----
|
||||
#----------------------------------------------
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
virtualenvs-path: console-test/.venv
|
||||
#----------------------------------------------
|
||||
# load cached venv if cache exists
|
||||
#----------------------------------------------
|
||||
- name: Load cached venv
|
||||
id: cached-poetry-dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: console-test/.venv
|
||||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
#----------------------------------------------
|
||||
# install dependencies if cache does not exist
|
||||
#----------------------------------------------
|
||||
- name: Install dependencies
|
||||
@@ -125,7 +90,7 @@ jobs:
|
||||
#----------------------------------------------
|
||||
- name: Run tests
|
||||
working-directory: ./console-test
|
||||
run: poetry run pytest -v -s --numprocesses auto --dist loadfile --durations=20
|
||||
run: poetry run pytest -v -s --numprocesses 2 --dist loadfile --durations=20
|
||||
- name: Check files
|
||||
run: |
|
||||
ls -al .
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
* @vegaprotocol/frontend
|
||||
* @vegaprotocol/frontend-qa
|
||||
*.graphql @vegaprotocol/core
|
||||
|
||||
@@ -11,7 +11,7 @@ recalculate-ipfs:
|
||||
echo "ipfs hash inside the image"
|
||||
docker run --rm ${TAG} cat /ipfs-hash
|
||||
echo "recalculating ipfs hash"
|
||||
docker run --rm ${TAG} ipfs add -r /usr/share/nginx/html
|
||||
docker run --rm ${TAG} ipfs add -rQ /usr/share/nginx/html
|
||||
|
||||
.PHONY: eject-ipfs-hash
|
||||
unpack:
|
||||
|
||||
@@ -115,11 +115,31 @@ docker run -p 3000:80 [TAG]
|
||||
|
||||
## Build instructions
|
||||
|
||||
The [`docker`](./docker) subfolder has some docker configurations for easily setting up your own hosted version of console either for the web, or ready for pinning on IPFS
|
||||
The [`docker`](./docker) subfolder has some docker configurations for easily setting up your own hosted version of Console either for the web, or ready for pinning on IPFS.
|
||||
|
||||
### nx build inside the docker
|
||||
|
||||
Using multistage dockerfile dist is compiled using [node](https://hub.docker.com/_/node) image and later packed to nginx as in [dist build](#dist-build). The multistage builds ensures consistent CPU architecture and build toolchains are used so that the result will be identical.
|
||||
|
||||
```bash
|
||||
docker build --build-arg APP=[YOUR APP] --build-arg NODE_VERSION=16.5.1 --build-arg ENV_NAME=mainnet -t [TAG] -f docker/node-inside-docker.Dockerfile .
|
||||
```
|
||||
|
||||
### Computing ipfs-hash of the build
|
||||
|
||||
At the moment this feature is important only for Console releases.
|
||||
|
||||
Each docker build finishes with hash calculation for ` dist`` directory. Resulting hash is added to file named as `/ipfs-hash`. Once docker image is produced you can run following commad to display ipfs-hash:
|
||||
|
||||
```bash
|
||||
make recalculate-ipfs TAG=vegaprotocol/trading:{YOUR_VERSION}
|
||||
```
|
||||
|
||||
**updating hash:** recompiling dist directory (even if there are no changed to source code) results in different hash computed by ipfs command.
|
||||
|
||||
### nx build outside the docker
|
||||
|
||||
Packaging prepared dist into [`nginx`](https://hub.docker.com/_/nginx)([server configuration](./nginx/nginx.conf)) docker image involves building the application on docker host machine from source.
|
||||
This Docker image packages a pre-built `dist` folder into an [`nginx`](https://hub.docker.com/_/nginx)([server configuration](./nginx/nginx.conf)) docker image. In this case, the application on docker host machine from source.
|
||||
|
||||
As a prerequisite you need to perform build of `dist` directory and move its content for specific application to `dist-result` directory. Use following script to do it with a single command:
|
||||
|
||||
@@ -133,38 +153,18 @@ You can build any of the containers locally with the following command:
|
||||
docker build --dockerfile docker/node-outside-docker.Dockerfile . --tag=[TAG]
|
||||
```
|
||||
|
||||
### nx build inside the docker
|
||||
|
||||
Using multistage dockerfile dist is compiled using [node](https://hub.docker.com/_/node) image and later packed to nginx as in [dist build](#dist-build) example.
|
||||
|
||||
```bash
|
||||
docker build --build-arg APP=[YOUR APP] --build-arg NODE_VERSION=$(cat .nvmrc) --build-arg ENV_NAME=mainnet -t [TAG] -f docker/node-inside-docker.Dockerfile .
|
||||
```
|
||||
|
||||
### Computing ipfs-hash of the build
|
||||
|
||||
At the moment this feature is important only for `trading` (console) releases.
|
||||
|
||||
Each docker build finishes with hash calculation for dist directory. Resulting hash is added to file named as `/ipfs-hash`. Once docker image is produced you can run following commad to display ipfs-hash:
|
||||
|
||||
```bash
|
||||
make recalculate-ipfs TAG=vegaprotocol/trading:{YOUR_VERSION}
|
||||
```
|
||||
|
||||
**updating hash:** recompiling dist directory (even if there are no changed to source code) results in different hash computed by ipfs command.
|
||||
|
||||
### Verifying ipfs-hash of existing current application version
|
||||
|
||||
An IPFS CID will be attached to every [release](https://github.com/vegaprotocol/frontend-monorepo/releases). If you are intending to pin an application on IPFS, you can check that your build matches by running the following steps:
|
||||
|
||||
1. Show latest release by runnning: `make latest-release`. You need to configure [`gh`](https://cli.github.com/) for this step to work, otherwise please provide release manually from [github](https://github.com/vegaprotocol/frontend-monorepo/releases) or [dockerhub](https://hub.docker.com/r/vegaprotocol/trading)
|
||||
1. Show latest release by running: `make latest-release`. You need to configure [`gh`](https://cli.github.com/) for this step to work, otherwise please provide release manually from [github](https://github.com/vegaprotocol/frontend-monorepo/releases) or [dockerhub](https://hub.docker.com/r/vegaprotocol/trading)
|
||||
2. Set RELEASE environment variable to value that you want to validate: `export RELEASE=$(make latest-release)` or `export RELEASE=vXX.XX.XX`
|
||||
3. Set TAG environment variable to image that you want to validate: `export TAG=vegaprotocol/trading:$RELEASE`
|
||||
4. Download docker image with the desired release `docker pull $TAG`.
|
||||
5. Recalculate hash: `make recalculate-ipfs`
|
||||
6. You should see exactly same hash produced by ipfs command as one placed with the release notes: `make show-latest-release`
|
||||
7. If you want to extract dist from docker image to your local filesystem you can run following command: `make unpack`
|
||||
8. Now `dist` directory contains valid application build. **it is not possible to calculate same ipfs hash on files that are result of copy operation**
|
||||
8. Now `dist` directory contains valid application build
|
||||
|
||||
## Config
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
before('navigate to network parameter page', function () {
|
||||
cy.fixture('net_parameter_format_lookup').as('networkParameterFormat');
|
||||
cy.visit('/network-parameters');
|
||||
});
|
||||
describe('Verify elements on page', function () {
|
||||
beforeEach(() => {
|
||||
cy.visit('/network-parameters');
|
||||
});
|
||||
|
||||
const networkParametersHeader = '[data-testid="network-param-header"]';
|
||||
const tableRows = '[data-testid="key-value-table-row"]';
|
||||
|
||||
@@ -16,6 +13,7 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
.and('be.visible');
|
||||
});
|
||||
|
||||
// 0006-NETW-021
|
||||
it('should list each of the network parameters available', function () {
|
||||
cy.get_network_parameters().then((network_parameters) => {
|
||||
const numberOfNetworkParametersInSystem =
|
||||
@@ -198,6 +196,19 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
});
|
||||
});
|
||||
|
||||
// 0006-NETW-022 0006-NETW-023
|
||||
it('governance assets should be correctly grouped', function () {
|
||||
cy.getByTestId('governance')
|
||||
.should('exist')
|
||||
.parent()
|
||||
.should('have.attr', 'href', '/network-parameters#governance');
|
||||
cy.get('[id="governance-proposal-asset"]')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.getByTestId('key-value-table-row').should('have.length', 8);
|
||||
});
|
||||
});
|
||||
|
||||
it('should be able to see network parameters - on mobile', function () {
|
||||
cy.switchToMobile();
|
||||
cy.get_network_parameters().then((network_parameters) => {
|
||||
|
||||
@@ -34,19 +34,20 @@ import { formatDateWithLocalTimezone } from '@vegaprotocol/utils';
|
||||
import { createSuccessorMarketProposalTxBody } from '../../support/proposal.functions';
|
||||
|
||||
const proposalListItem = '[data-testid="proposals-list-item"]';
|
||||
const proposalVoteProgressForPercentage =
|
||||
'vote-progress-indicator-percentage-for';
|
||||
const proposalVoteProgressAgainstPercentage =
|
||||
'vote-progress-indicator-percentage-against';
|
||||
const proposalVoteProgressForTokens = 'vote-progress-indicator-tokens-for';
|
||||
const proposalVoteProgressAgainstTokens =
|
||||
'vote-progress-indicator-tokens-against';
|
||||
const participationNotMet = 'token-participation-not-met';
|
||||
const voteStatus = 'vote-status';
|
||||
const voteMajorityNotMet = 'token-majority-not-met';
|
||||
const numberOfVotesFor = 'num-votes-for';
|
||||
const votesForPercentage = 'votes-for-percentage';
|
||||
const numberOfVotesAgainst = 'num-votes-against';
|
||||
const votesAgainstPercentage = 'votes-against-percentage';
|
||||
const totalVotedNumber = 'total-voted';
|
||||
const totalVotedPercentage = 'total-voted-percentage';
|
||||
const changeVoteButton = 'change-vote-button';
|
||||
const proposalDetailsTitle = 'proposal-title';
|
||||
const proposalDetailsDescription = 'proposal-description';
|
||||
const openProposals = 'open-proposals';
|
||||
const viewProposalButton = 'view-proposal-btn';
|
||||
const voteBreakdownToggle = 'vote-breakdown-toggle';
|
||||
const proposalTermsToggle = 'proposal-json-toggle';
|
||||
const marketDataToggle = 'proposal-market-data-toggle';
|
||||
|
||||
@@ -150,29 +151,32 @@ describe(
|
||||
// 3001-VOTE-037
|
||||
// 3001-VOTE-040
|
||||
// 3001-VOTE-067
|
||||
// 3001-VOTE-023
|
||||
createRawProposal();
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
getProposalFromTitle(rawProposal.rationale.title).within(() =>
|
||||
cy.getByTestId(viewProposalButton).click()
|
||||
);
|
||||
});
|
||||
cy.contains('Participation: Not Met 0.00 0.00%(0.00% Required)').should(
|
||||
'be.visible'
|
||||
cy.getByTestId(participationNotMet).should(
|
||||
'have.text',
|
||||
'0.000000000000000000000015% participation threshold not met'
|
||||
);
|
||||
cy.getByTestId(voteMajorityNotMet).should(
|
||||
'have.text',
|
||||
'66% majority threshold not met'
|
||||
);
|
||||
cy.getByTestId(voteStatus).should(
|
||||
'have.text',
|
||||
'Currently expected to fail'
|
||||
);
|
||||
cy.getByTestId(voteBreakdownToggle).click();
|
||||
getProposalInformationFromTable('Expected to pass')
|
||||
.contains('👎')
|
||||
.should('be.visible');
|
||||
// 3001-VOTE-062
|
||||
// 3001-VOTE-040
|
||||
// 3001-VOTE-070
|
||||
getProposalInformationFromTable('Token majority met')
|
||||
.contains('👎')
|
||||
.should('be.visible');
|
||||
// 3001-VOTE-068
|
||||
getProposalInformationFromTable('Token participation met')
|
||||
.contains('👎')
|
||||
.should('be.visible');
|
||||
cy.getByTestId(numberOfVotesFor).should('have.text', '0.0M');
|
||||
cy.getByTestId(numberOfVotesAgainst).should('have.text', '0.0M');
|
||||
cy.getByTestId(totalVotedNumber).should('have.text', '0.0M');
|
||||
});
|
||||
|
||||
// 3001-VOTE-080 3001-VOTE-090 3001-VOTE-069 3001-VOTE-072 3001-VOTE-073
|
||||
@@ -197,43 +201,16 @@ describe(
|
||||
.contains(votedDate)
|
||||
.should('be.visible');
|
||||
});
|
||||
cy.getByTestId(proposalVoteProgressForPercentage) // 3001-VOTE-072
|
||||
.contains('100.00%')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressAgainstPercentage)
|
||||
.contains('0.00%')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressForTokens)
|
||||
.contains('1.00')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressAgainstTokens)
|
||||
.contains('0.00')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(voteBreakdownToggle).click();
|
||||
getProposalInformationFromTable('Tokens for proposal')
|
||||
.should('have.text', (1).toFixed(2))
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Tokens against proposal')
|
||||
.should('have.text', '0.00')
|
||||
.and('be.visible');
|
||||
// 3001-VOTE-061
|
||||
getProposalInformationFromTable('Participation required')
|
||||
.contains('0.00%')
|
||||
.should('be.visible');
|
||||
// 3001-VOTE-066
|
||||
getProposalInformationFromTable('Majority Required') // 3001-VOTE-073
|
||||
.contains(`${(66).toFixed(2)}%`)
|
||||
.should('be.visible');
|
||||
getProposalInformationFromTable('Number of voting parties')
|
||||
.should('have.text', '1')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(votesForPercentage) // 3001-VOTE-072
|
||||
.should('have.text', '100%');
|
||||
cy.getByTestId(votesAgainstPercentage).should('have.text', '0%');
|
||||
cy.getByTestId('token-majority-progress')
|
||||
.should('have.attr', 'style')
|
||||
.and('eq', 'width: 100%;'); // 3001-VOTE-024
|
||||
cy.getByTestId(changeVoteButton).should('be.visible').click();
|
||||
voteForProposal('for');
|
||||
// 3001-VOTE-064
|
||||
cy.getByTestId('user-voted-yes').should('exist');
|
||||
getProposalInformationFromTable('Tokens for proposal')
|
||||
.should('have.text', (1).toFixed(2))
|
||||
.and('be.visible');
|
||||
navigateTo(navigation.proposals);
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
getProposalFromTitle(rawProposal.rationale.title).within(() => {
|
||||
@@ -244,16 +221,7 @@ describe(
|
||||
});
|
||||
cy.getByTestId(changeVoteButton).should('be.visible').click();
|
||||
voteForProposal('against');
|
||||
cy.getByTestId(proposalVoteProgressAgainstPercentage)
|
||||
.contains('100.00%')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(voteBreakdownToggle).click();
|
||||
getProposalInformationFromTable('Tokens against proposal')
|
||||
.should('have.text', (1).toFixed(2))
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Number of voting parties')
|
||||
.should('have.text', '1')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(votesAgainstPercentage).should('have.text', '100%');
|
||||
navigateTo(navigation.proposals);
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
getProposalFromTitle(rawProposal.rationale.title).within(() => {
|
||||
@@ -265,6 +233,7 @@ describe(
|
||||
|
||||
// 3001-VOTE-042, 3001-VOTE-057, 3001-VOTE-058, 3001-VOTE-059, 3001-VOTE-060
|
||||
it('Newly created proposal details - ability to increase associated tokens - by voting again after association', function () {
|
||||
ensureSpecifiedUnstakedTokensAreAssociated('1');
|
||||
vegaWalletSetSpecifiedApprovalAmount('1000');
|
||||
createRawProposal();
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
@@ -275,69 +244,28 @@ describe(
|
||||
voteForProposal('for');
|
||||
// 3001-VOTE-079
|
||||
cy.contains('You voted: For').should('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressForTokens)
|
||||
.contains('1')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(voteBreakdownToggle).click();
|
||||
getProposalInformationFromTable('Total Supply')
|
||||
.invoke('text')
|
||||
.then((totalSupply) => {
|
||||
const tokensRequiredToAchieveResult = (
|
||||
(Number(totalSupply.replace(/,/g, '')) * 0.001) /
|
||||
100
|
||||
).toFixed(2);
|
||||
ethereumWalletConnect();
|
||||
ensureSpecifiedUnstakedTokensAreAssociated(
|
||||
tokensRequiredToAchieveResult
|
||||
);
|
||||
navigateTo(navigation.proposals);
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
getProposalFromTitle(rawProposal.rationale.title).within(() =>
|
||||
cy.getByTestId(viewProposalButton).click()
|
||||
);
|
||||
});
|
||||
cy.getByTestId(proposalVoteProgressForPercentage)
|
||||
.contains('100.00%')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressAgainstPercentage)
|
||||
.contains('0.00%')
|
||||
.and('be.visible');
|
||||
// 3001-VOTE-065
|
||||
cy.getByTestId(changeVoteButton).should('be.visible').click();
|
||||
voteForProposal('for');
|
||||
cy.getByTestId(proposalVoteProgressForTokens)
|
||||
.contains(tokensRequiredToAchieveResult)
|
||||
.and('be.visible');
|
||||
cy.getByTestId(proposalVoteProgressAgainstTokens)
|
||||
.contains('0.00')
|
||||
.and('be.visible');
|
||||
cy.getByTestId(voteBreakdownToggle).click();
|
||||
getProposalInformationFromTable('Total tokens voted percentage')
|
||||
.should('have.text', '0.00%')
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Tokens for proposal')
|
||||
.should('have.text', tokensRequiredToAchieveResult)
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Tokens against proposal')
|
||||
.should('have.text', '0.00')
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Number of voting parties')
|
||||
.should('have.text', '1')
|
||||
.and('be.visible');
|
||||
getProposalInformationFromTable('Expected to pass')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
// 3001-VOTE-062
|
||||
getProposalInformationFromTable('Token majority met')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
getProposalInformationFromTable('Token participation met')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
getProposalInformationFromTable('Tokens for proposal')
|
||||
.contains(tokensRequiredToAchieveResult)
|
||||
.and('be.visible');
|
||||
});
|
||||
cy.getByTestId(numberOfVotesFor).should('have.text', '0.0M');
|
||||
cy.getByTestId(votesForPercentage).should('have.text', '100%');
|
||||
cy.getByTestId(totalVotedNumber).should('have.text', '0.0M');
|
||||
cy.getByTestId(totalVotedPercentage).should('have.text', '(0.00%)');
|
||||
ethereumWalletConnect();
|
||||
stakingPageAssociateTokens('1000000', { approve: true });
|
||||
navigateTo(navigation.proposals);
|
||||
cy.get<testFreeformProposal>('@rawProposal').then((rawProposal) => {
|
||||
getProposalFromTitle(rawProposal.rationale.title).within(() =>
|
||||
cy.getByTestId(viewProposalButton).click()
|
||||
);
|
||||
});
|
||||
cy.getByTestId(votesForPercentage).should('have.text', '100%');
|
||||
cy.getByTestId(numberOfVotesFor).should('have.text', '0.0M');
|
||||
cy.getByTestId(totalVotedNumber).should('have.text', '0.0M');
|
||||
cy.getByTestId(totalVotedPercentage).should('have.text', '(0.00%)');
|
||||
// 3001-VOTE-065
|
||||
cy.getByTestId(changeVoteButton).should('be.visible').click();
|
||||
voteForProposal('for');
|
||||
cy.getByTestId(numberOfVotesFor).should('have.text', '1.0M');
|
||||
cy.getByTestId(totalVotedNumber).should('have.text', '1.0M');
|
||||
cy.getByTestId(totalVotedPercentage).should('have.text', '(1.54%)');
|
||||
});
|
||||
|
||||
it('Able to vote for proposal twice by switching public key', function () {
|
||||
@@ -360,10 +288,6 @@ describe(
|
||||
voteForProposal('against');
|
||||
cy.contains('You voted: Against').should('be.visible');
|
||||
switchVegaWalletPubKey();
|
||||
cy.getByTestId(proposalVoteProgressForTokens).should(
|
||||
'contain.text',
|
||||
'1.00'
|
||||
);
|
||||
// Checking vote status for different public keys is displayed correctly
|
||||
cy.contains('You voted: For').should('be.visible');
|
||||
});
|
||||
|
||||
@@ -22,12 +22,10 @@ const proposalListItem = '[data-testid="proposals-list-item"]';
|
||||
const closedProposals = 'closed-proposals';
|
||||
const proposalStatus = 'proposal-status';
|
||||
const viewProposalButton = 'view-proposal-btn';
|
||||
const votesTable = 'votes-table';
|
||||
const votesTable = 'user-vote';
|
||||
const openProposals = 'open-proposals';
|
||||
const proposalVoteProgressForPercentage =
|
||||
'vote-progress-indicator-percentage-for';
|
||||
const majorityVoteReached = 'majority-reached';
|
||||
const minParticipationReached = 'participation-reached';
|
||||
const majorityVoteReached = 'token-majority-met';
|
||||
const minParticipationReached = 'token-participation-met';
|
||||
const proposalTimeout = { timeout: 8000 };
|
||||
|
||||
context(
|
||||
@@ -70,7 +68,6 @@ context(
|
||||
cy.getByTestId('proposal-type').should('have.text', 'New market');
|
||||
cy.getByTestId(proposalStatus).should('have.text', 'Enacted');
|
||||
cy.getByTestId(votesTable).within(() => {
|
||||
cy.contains('Vote passed.').should('be.visible');
|
||||
cy.contains('Voting has ended.').should('be.visible');
|
||||
});
|
||||
});
|
||||
@@ -92,7 +89,7 @@ context(
|
||||
// 3001-VOTE-019 time to vote is highlighted red
|
||||
cy.getByTestId('vote-details')
|
||||
.find('span')
|
||||
.should('have.class', 'text-vega-pink');
|
||||
.should('have.class', 'text-vega-orange');
|
||||
cy.getByTestId(viewProposalButton).click();
|
||||
});
|
||||
});
|
||||
@@ -109,12 +106,9 @@ context(
|
||||
);
|
||||
});
|
||||
cy.getByTestId(votesTable).within(() => {
|
||||
cy.contains('Vote passed.').should('be.visible');
|
||||
cy.contains('Voting has ended.').should('be.visible');
|
||||
});
|
||||
cy.getByTestId(proposalVoteProgressForPercentage)
|
||||
.contains('100.00%')
|
||||
.and('be.visible');
|
||||
cy.getByTestId('votes-for-percentage').should('have.text', '100%');
|
||||
navigateTo(navigation.proposals);
|
||||
cy.contains(proposalTitle)
|
||||
.parentsUntil(proposalListItem)
|
||||
|
||||
@@ -298,9 +298,6 @@ context(
|
||||
getProposalFromTitle(proposalTitle).within(() =>
|
||||
cy.getByTestId(viewProposalButton).click()
|
||||
);
|
||||
cy.contains('Vote breakdown').should('be.visible', {
|
||||
timeout: 10000,
|
||||
});
|
||||
cy.getByTestId(voteButtons).should('not.exist');
|
||||
cy.getByTestId('min-proposal-requirements').should(
|
||||
'have.text',
|
||||
|
||||
@@ -52,8 +52,6 @@ const enactmentDeadlineError = 'enactment-before-voting-deadline';
|
||||
const proposalDownloadBtn = 'proposal-download-json';
|
||||
const feedbackError = '[data-testid="Error"]';
|
||||
const viewProposalBtn = 'view-proposal-btn';
|
||||
const liquidityVoteStatus = 'liquidity-votes-status';
|
||||
const tokenVoteStatus = 'token-votes-status';
|
||||
const proposalJsonToggle = 'proposal-json-toggle';
|
||||
const proposalJsonSection = 'proposal-json';
|
||||
const vegaWalletPublicKey = Cypress.env('vegaWalletPublicKey');
|
||||
@@ -421,27 +419,28 @@ context(
|
||||
cy.getByTestId(viewProposalBtn).click();
|
||||
});
|
||||
});
|
||||
cy.getByTestId(liquidityVoteStatus).should(
|
||||
'contain.text',
|
||||
'Currently expected to fail'
|
||||
cy.getByTestId('lp-majority-not-met').should(
|
||||
'have.text',
|
||||
'66% majority threshold not met'
|
||||
);
|
||||
cy.getByTestId(tokenVoteStatus).should(
|
||||
'contain.text',
|
||||
'Currently expected to fail'
|
||||
|
||||
cy.getByTestId('token-majority-not-met').should(
|
||||
'have.text',
|
||||
'66% majority threshold not met'
|
||||
);
|
||||
voteForProposal('for');
|
||||
cy.getByTestId(liquidityVoteStatus).should(
|
||||
'contain.text',
|
||||
'Currently expected to pass'
|
||||
cy.getByTestId('lp-majority-met').should(
|
||||
'have.text',
|
||||
'66% majority threshold met'
|
||||
);
|
||||
cy.getByTestId(tokenVoteStatus).should(
|
||||
'contain.text',
|
||||
'Currently expected to pass'
|
||||
cy.getByTestId('token-majority-met').should(
|
||||
'have.text',
|
||||
'66% majority threshold met'
|
||||
);
|
||||
cy.getByTestId('vote-status').should(
|
||||
'have.text',
|
||||
'Currently expected to pass by token vote'
|
||||
);
|
||||
cy.getByTestId('vote-breakdown-toggle').click();
|
||||
getProposalInformationFromTable('Expected to pass')
|
||||
.contains('👍 by token vote')
|
||||
.should('be.visible');
|
||||
});
|
||||
|
||||
// 3001-VOTE-026 3001-VOTE-027 3001-VOTE-028 3001-VOTE-095 3001-VOTE-096 3005-PASN-001
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
enterRawProposalBody,
|
||||
generateFreeFormProposalTitle,
|
||||
getProposalFromTitle,
|
||||
getProposalInformationFromTable,
|
||||
goToMakeNewProposal,
|
||||
governanceProposalType,
|
||||
submitUniqueRawProposal,
|
||||
@@ -30,7 +29,9 @@ const proposalType = 'proposal-type';
|
||||
const proposalStatus = 'proposal-status';
|
||||
const proposalClosingDate = 'vote-details';
|
||||
const viewProposalButton = 'view-proposal-btn';
|
||||
const voteBreakDownToggle = 'vote-breakdown-toggle';
|
||||
const voteMajorityNotMet = 'token-majority-not-met';
|
||||
const voteMajorityMet = 'token-majority-met';
|
||||
const votesForPercentage = 'votes-for-percentage';
|
||||
|
||||
describe('Governance flow for proposal list', { tags: '@slow' }, function () {
|
||||
before('connect wallets and set approval limit', function () {
|
||||
@@ -121,10 +122,15 @@ describe('Governance flow for proposal list', { tags: '@slow' }, function () {
|
||||
submitUniqueRawProposal({ proposalTitle: proposalTitle });
|
||||
getProposalFromTitle(proposalTitle).within(() => {
|
||||
// 3001-VOTE-039
|
||||
cy.getByTestId('participation-not-reached').should(
|
||||
cy.getByTestId(voteMajorityNotMet).should(
|
||||
'have.text',
|
||||
'Min. participation not reached'
|
||||
'66% majority threshold not met'
|
||||
);
|
||||
cy.getByTestId('token-participation-not-met').should(
|
||||
'have.text',
|
||||
'0.000000000000000000000015% participation threshold not met'
|
||||
);
|
||||
cy.getByTestId(votesForPercentage).should('have.text', '0%');
|
||||
cy.getByTestId(viewProposalButton).click();
|
||||
});
|
||||
voteForProposal('for');
|
||||
@@ -134,16 +140,15 @@ describe('Governance flow for proposal list', { tags: '@slow' }, function () {
|
||||
'have.text',
|
||||
'Currently expected to pass'
|
||||
);
|
||||
cy.getByTestId('user-voted-yes').should('exist');
|
||||
cy.getByTestId('participation-reached').should(
|
||||
cy.getByTestId(voteMajorityMet).should(
|
||||
'have.text',
|
||||
'Min. participation reached'
|
||||
'66% majority threshold met'
|
||||
);
|
||||
cy.getByTestId(votesForPercentage).should('have.text', '100%');
|
||||
cy.getByTestId('token-participation-met').should(
|
||||
'have.text',
|
||||
'0.000000000000000000000015% participation threshold met'
|
||||
);
|
||||
cy.getByTestId(viewProposalButton).click();
|
||||
});
|
||||
cy.getByTestId(voteBreakDownToggle).click();
|
||||
getProposalInformationFromTable('Token participation met')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -37,11 +37,39 @@ context(
|
||||
});
|
||||
|
||||
// 3002-PROP-023 3004-PMAC-002 3005-PASN-002 3006-PASC-002 3007-PNEC-002 3008-PFRO-003
|
||||
it('should have button for link to more information on proposals', function () {
|
||||
const proposalsUrl = 'https://docs.vega.xyz/mainnet/tutorials/proposals';
|
||||
cy.getByTestId('new-proposal-link')
|
||||
.find('a')
|
||||
.should('have.attr', 'href', proposalsUrl);
|
||||
it('new proposal page should have button for link to more information on proposals', function () {
|
||||
cy.getByTestId('new-proposal-link').click();
|
||||
cy.url().should('include', '/proposals/propose/raw');
|
||||
cy.contains('To see Explorer data on proposals visit').within(() => {
|
||||
cy.getByTestId('external-link').should(
|
||||
'have.attr',
|
||||
'href',
|
||||
'https://explorer.fairground.wtf/governance'
|
||||
);
|
||||
});
|
||||
cy.contains(
|
||||
'1. Sense check your proposal with the community on the forum:'
|
||||
).within(() => {
|
||||
cy.getByTestId('external-link').should(
|
||||
'have.attr',
|
||||
'href',
|
||||
'https://community.vega.xyz/c/governance/25'
|
||||
);
|
||||
});
|
||||
cy.contains(
|
||||
'2. Use the appropriate proposal template in the docs:'
|
||||
).within(() => {
|
||||
cy.getByTestId('external-link').should(
|
||||
'have.attr',
|
||||
'href',
|
||||
'https://docs.vega.xyz/mainnet/tutorials/proposals'
|
||||
);
|
||||
});
|
||||
cy.contains('Connect your wallet to submit a proposal').should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.getByTestId('connect-to-vega-wallet-btn').should('exist');
|
||||
navigateTo(navigation.proposals);
|
||||
});
|
||||
|
||||
it('should be able to see a working link for - find out more about Vega governance', function () {
|
||||
|
||||
@@ -146,7 +146,7 @@ export function getProposalInformationFromTable(heading: string) {
|
||||
}
|
||||
|
||||
export function voteForProposal(vote: string) {
|
||||
cy.contains('Vote breakdown').should('be.visible', { timeout: 10000 });
|
||||
cy.get(voteButtons).should('be.visible', { timeout: 10000 });
|
||||
cy.get(voteButtons).contains(vote).click();
|
||||
cy.get(dialogTitle, proposalTimeout).should(
|
||||
'have.text',
|
||||
|
||||
@@ -219,7 +219,9 @@ export function ensureSpecifiedUnstakedTokensAreAssociated(
|
||||
.eq(1)
|
||||
.invoke('text')
|
||||
.then((unstakedBalance) => {
|
||||
if (parseFloat(unstakedBalance) != parseFloat(tokenAmount)) {
|
||||
const tokenFloat = parseFloat(tokenAmount);
|
||||
const unstakedFloat = parseFloat(unstakedBalance.replace(/,/g, ''));
|
||||
if (tokenFloat != unstakedFloat) {
|
||||
vegaWalletTeardown();
|
||||
cy.get(vegaWalletAssociatedBalance, txTimeout).contains(
|
||||
'0.00',
|
||||
|
||||
@@ -184,7 +184,7 @@ const Web3Container = ({
|
||||
<TemplateSidebar sidebar={sideBar}>
|
||||
<AppRouter />
|
||||
</TemplateSidebar>
|
||||
<footer className="p-4 border-t border-neutral-700">
|
||||
<footer className="p-4 border-t border-neutral-700 break-all">
|
||||
<NetworkInfo />
|
||||
</footer>
|
||||
</AppLayout>
|
||||
@@ -308,7 +308,7 @@ const AppContainer = () => {
|
||||
<Router>
|
||||
<ScrollToTop />
|
||||
<AppStateProvider>
|
||||
<div className="min-h-full text-white grid">
|
||||
<div className="min-h-full text-white">
|
||||
<NodeGuard
|
||||
skeleton={<div>{t('Loading')}</div>}
|
||||
failure={
|
||||
|
||||
@@ -708,7 +708,7 @@
|
||||
"NewAssetProposal": "New asset proposal",
|
||||
"UpdateAssetProposal": "Update asset proposal",
|
||||
"NewFreeformProposal": "New freeform proposal",
|
||||
"NewRawProposal": "New raw proposal",
|
||||
"NewRawProposal": "New proposal",
|
||||
"MinProposalRequirements": "You must have at least {{value}} VEGA associated to make a proposal",
|
||||
"MinProposalVoteRequirements": "You must have at least {{value}} VEGA associated to vote on this proposal",
|
||||
"totalSupply": "Total Supply",
|
||||
@@ -870,5 +870,9 @@
|
||||
"Upgraded at": "Upgraded at",
|
||||
"dataIsIdentical": "Data is identical",
|
||||
"updatesToMarket": "Updates to market",
|
||||
"viewAsParty": "View as party"
|
||||
"viewAsParty": "View as party",
|
||||
"HowToPropose": "How to make a proposal",
|
||||
"HowToProposeRawStep1": "1. Sense check your proposal with the community on the forum:",
|
||||
"HowToProposeRawStep2": "2. Use the appropriate proposal template in the docs:",
|
||||
"HowToProposeRawStep3": "3. Submit on-chain below"
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ const GovernanceHome = ({ name }: RouteChildProps) => {
|
||||
trimmedActiveNodes={trimmedActiveNodes}
|
||||
/>
|
||||
|
||||
<section className="grid grid-cols-2 gap-12 mb-16">
|
||||
<div data-testid="home-rewards">
|
||||
<section className="flex justify-between flex-wrap gap-12 mb-16">
|
||||
<div className="min-w-[360px] flex-1" data-testid="home-rewards">
|
||||
<Heading title={t('Rewards')} marginTop={false} />
|
||||
<h3 className="mb-6">{t('homeRewardsIntro')}</h3>
|
||||
<div className="flex items-center mb-8 gap-4">
|
||||
@@ -290,7 +290,7 @@ const GovernanceHome = ({ name }: RouteChildProps) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-testid="home-vega-token">
|
||||
<div className="min-w-[360px] flex-1" data-testid="home-vega-token">
|
||||
<Heading title={t('vegaToken')} marginTop={false} />
|
||||
<h3 className="mb-6">{t('homeVegaTokenIntro')}</h3>
|
||||
<div className="flex items-center mb-8 gap-4">
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ export const ProposalHeader = ({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-testid="proposal-title">
|
||||
<div data-testid="proposal-title" className="break-all">
|
||||
{isListItem ? (
|
||||
<header>
|
||||
<SubHeading
|
||||
|
||||
@@ -7,18 +7,13 @@ import { ProposalsListItem } from '../proposals-list-item';
|
||||
import { ProtocolUpgradeProposalsListItem } from '../protocol-upgrade-proposals-list-item/protocol-upgrade-proposals-list-item';
|
||||
import { ProposalsListFilter } from '../proposals-list-filter';
|
||||
import Routes from '../../../routes';
|
||||
import {
|
||||
Button,
|
||||
Toggle,
|
||||
VegaIcon,
|
||||
VegaIconNames,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { Button, Toggle } from '@vegaprotocol/ui-toolkit';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
||||
import type { ProposalQuery } from '../../proposal/__generated__/Proposal';
|
||||
import type { ProposalFieldsFragment } from '../../proposals/__generated__/Proposals';
|
||||
import type { ProtocolUpgradeProposalFieldsFragment } from '@vegaprotocol/proposals';
|
||||
import { DocsLinks, ExternalLinks } from '@vegaprotocol/environment';
|
||||
import { ExternalLinks } from '@vegaprotocol/environment';
|
||||
|
||||
interface ProposalsListProps {
|
||||
proposals: Array<ProposalFieldsFragment | ProposalQuery['proposal']>;
|
||||
@@ -55,7 +50,10 @@ export const orderByUpgradeBlockHeight = (
|
||||
) =>
|
||||
orderBy(
|
||||
arr,
|
||||
[(p) => p?.upgradeBlockHeight, (p) => p.vegaReleaseTag],
|
||||
[
|
||||
(p) => (p?.upgradeBlockHeight ? parseInt(p.upgradeBlockHeight, 10) : 0),
|
||||
(p) => p.vegaReleaseTag,
|
||||
],
|
||||
['desc', 'desc']
|
||||
);
|
||||
|
||||
@@ -142,18 +140,13 @@ export const ProposalsList = ({
|
||||
title={t('pageTitleProposals')}
|
||||
/>
|
||||
|
||||
{DocsLinks && (
|
||||
<div className="xs:justify-self-end" data-testid="new-proposal-link">
|
||||
<ExternalLink href={DocsLinks.PROPOSALS_GUIDE}>
|
||||
<Button variant="primary" size="sm">
|
||||
<div className="flex items-center gap-1">
|
||||
{t('NewProposal')}
|
||||
<VegaIcon name={VegaIconNames.OPEN_EXTERNAL} size={13} />
|
||||
</div>
|
||||
</Button>
|
||||
</ExternalLink>
|
||||
</div>
|
||||
)}
|
||||
<div className="xs:justify-self-end" data-testid="new-proposal-link">
|
||||
<Link to={`${Routes.PROPOSALS}/propose/raw`}>
|
||||
<Button variant="primary" size="sm">
|
||||
<div className="flex items-center gap-1">{t('NewProposal')}</div>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p className="mb-8">
|
||||
@@ -224,10 +217,10 @@ export const ProposalsList = ({
|
||||
sortedProtocolUpgradeProposals.closed.length > 0 &&
|
||||
filterString.length < 1 && (
|
||||
<div
|
||||
className="grid w-full justify-end xl:-mt-12 pb-6"
|
||||
className="flex justify-end xl:-mt-12 pb-6"
|
||||
data-testid="toggle-closed-proposals"
|
||||
>
|
||||
<div className="w-[440px]">
|
||||
<div className="w-full max-w-[420px]">
|
||||
<Toggle
|
||||
name="closed-proposals-toggle"
|
||||
toggles={[
|
||||
|
||||
@@ -130,7 +130,10 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
? t('byTokenVote')
|
||||
: t('byLiquidityVote');
|
||||
|
||||
const sectionWrapperClasses = classNames('grid sm:grid-cols-2 gap-6');
|
||||
const sectionWrapperClasses = classNames(
|
||||
'flex justify-between flex-wrap gap-6'
|
||||
);
|
||||
const sectionClasses = classNames('min-w-[300px] flex-1 flex-grow');
|
||||
const headingClasses = classNames('mb-2 text-vega-dark-400');
|
||||
const progressDetailsClasses = classNames(
|
||||
'flex justify-between flex-wrap mt-2 text-sm'
|
||||
@@ -166,7 +169,10 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<div className="mb-4">
|
||||
<h3 className={headingClasses}>{t('liquidityProviderVote')}</h3>
|
||||
<div className={sectionWrapperClasses}>
|
||||
<section data-testid="lp-majority-breakdown">
|
||||
<section
|
||||
className={sectionClasses}
|
||||
data-testid="lp-majority-breakdown"
|
||||
>
|
||||
<VoteProgress
|
||||
percentageFor={yesLPPercentage}
|
||||
colourfulBg={true}
|
||||
@@ -241,7 +247,10 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section data-testid="lp-participation-breakdown">
|
||||
<section
|
||||
className={sectionClasses}
|
||||
data-testid="lp-participation-breakdown"
|
||||
>
|
||||
<VoteProgress
|
||||
percentageFor={
|
||||
lpParticipationThresholdProgress || new BigNumber(0)
|
||||
@@ -288,7 +297,10 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
|
||||
{isUpdateMarket && <h3 className={headingClasses}>{t('tokenVote')}</h3>}
|
||||
<div className={sectionWrapperClasses}>
|
||||
<section data-testid="token-majority-breakdown">
|
||||
<section
|
||||
className={sectionClasses}
|
||||
data-testid="token-majority-breakdown"
|
||||
>
|
||||
<VoteProgress
|
||||
percentageFor={yesPercentage}
|
||||
colourfulBg={true}
|
||||
@@ -308,7 +320,7 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<div className="flex items-center gap-1">
|
||||
<span>{t('tokenVotesFor')}:</span>
|
||||
<Tooltip description={formatNumber(yesTokens, defaultDP)}>
|
||||
<button>
|
||||
<button data-testid="num-votes-for">
|
||||
{yesTokens.dividedBy(toBigNum(10 ** 6, 0)).toFixed(1)}M
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -317,7 +329,9 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<Tooltip
|
||||
description={<span>{yesPercentage.toFixed(defaultDP)}%</span>}
|
||||
>
|
||||
<button>{yesPercentage.toFixed(0)}%</button>
|
||||
<button data-testid="votes-for-percentage">
|
||||
{yesPercentage.toFixed(0)}%
|
||||
</button>
|
||||
</Tooltip>
|
||||
)
|
||||
</span>
|
||||
@@ -326,7 +340,7 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<div className="flex items-center gap-1">
|
||||
<span>{t('tokenVotesAgainst')}:</span>
|
||||
<Tooltip description={formatNumber(noTokens, defaultDP)}>
|
||||
<button>
|
||||
<button data-testid="num-votes-against">
|
||||
{noTokens.dividedBy(toBigNum(10 ** 6, 0)).toFixed(1)}M
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -335,7 +349,9 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<Tooltip
|
||||
description={<span>{noPercentage.toFixed(defaultDP)}%</span>}
|
||||
>
|
||||
<button>{noPercentage.toFixed(0)}%</button>
|
||||
<button data-testid="votes-against-percentage">
|
||||
{noPercentage.toFixed(0)}%
|
||||
</button>
|
||||
</Tooltip>
|
||||
)
|
||||
</span>
|
||||
@@ -343,7 +359,10 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section data-testid="token-participation-breakdown">
|
||||
<section
|
||||
className={sectionClasses}
|
||||
data-testid="token-participation-breakdown"
|
||||
>
|
||||
<VoteProgress
|
||||
percentageFor={participationThresholdProgress}
|
||||
testId="token-participation-progress"
|
||||
@@ -364,11 +383,13 @@ export const VoteBreakdown = ({ proposal }: VoteBreakdownProps) => {
|
||||
<div className="flex items-center gap-1">
|
||||
<span>{t('totalTokensVoted')}:</span>
|
||||
<Tooltip description={formatNumber(totalTokensVoted, defaultDP)}>
|
||||
<button>
|
||||
<button data-testid="total-voted">
|
||||
{totalTokensVoted.dividedBy(toBigNum(10 ** 6, 0)).toFixed(1)}M
|
||||
</button>
|
||||
</Tooltip>
|
||||
<span>({totalTokensPercentage.toFixed(defaultDP)}%)</span>
|
||||
<span data-testid="total-voted-percentage">
|
||||
({totalTokensPercentage.toFixed(defaultDP)}%)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useEnvironment, DocsLinks } from '@vegaprotocol/environment';
|
||||
import { Heading } from '../../../../components/heading';
|
||||
import {
|
||||
useEnvironment,
|
||||
DocsLinks,
|
||||
ExternalLinks,
|
||||
} from '@vegaprotocol/environment';
|
||||
import { Heading, SubHeading } from '../../../../components/heading';
|
||||
import {
|
||||
AsyncRenderer,
|
||||
ExternalLink,
|
||||
FormGroup,
|
||||
InputError,
|
||||
RoundedWrapper,
|
||||
TextArea,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { validateJson } from '@vegaprotocol/utils';
|
||||
@@ -79,15 +84,6 @@ export const ProposeRaw = () => {
|
||||
spamProtectionMin={params.spam_protection_proposal_min_tokens}
|
||||
/>
|
||||
|
||||
{DocsLinks && (
|
||||
<p className="text-sm" data-testid="proposal-docs-link">
|
||||
<span className="mr-1">{t('ProposalTermsText')}</span>
|
||||
<ExternalLink href={DocsLinks.PROPOSALS_GUIDE} target="_blank">
|
||||
{DocsLinks.PROPOSALS_GUIDE}
|
||||
</ExternalLink>
|
||||
</p>
|
||||
)}
|
||||
|
||||
{VEGA_EXPLORER_URL && (
|
||||
<p className="text-sm">
|
||||
{t('MoreProposalsInfo')}{' '}
|
||||
@@ -98,12 +94,44 @@ export const ProposeRaw = () => {
|
||||
</p>
|
||||
)}
|
||||
|
||||
<section data-testid="how-to" className="my-10">
|
||||
<RoundedWrapper paddingBottom={true}>
|
||||
<SubHeading title={t('HowToPropose')} />
|
||||
<ul>
|
||||
<li className="p-1">
|
||||
{t('HowToProposeRawStep1')}{' '}
|
||||
{ExternalLinks && (
|
||||
<span data-testid="proposal-docs-link">
|
||||
<ExternalLink
|
||||
href={ExternalLinks.PROPOSALS_FORUM}
|
||||
target="_blank"
|
||||
>
|
||||
{ExternalLinks.PROPOSALS_FORUM}
|
||||
</ExternalLink>
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
<li className="p-1">
|
||||
{t('HowToProposeRawStep2')}{' '}
|
||||
{DocsLinks && (
|
||||
<span data-testid="proposal-docs-link">
|
||||
<ExternalLink
|
||||
href={DocsLinks.PROPOSALS_GUIDE}
|
||||
target="_blank"
|
||||
>
|
||||
{DocsLinks.PROPOSALS_GUIDE}
|
||||
</ExternalLink>
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
<li className="p-1">{t('HowToProposeRawStep3')}</li>
|
||||
</ul>
|
||||
</RoundedWrapper>
|
||||
</section>
|
||||
|
||||
<div data-testid="raw-proposal-form">
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<FormGroup
|
||||
label="Make a proposal by submitting JSON"
|
||||
labelFor="proposal-data"
|
||||
>
|
||||
<FormGroup label="Valid JSON required" labelFor="proposal-data">
|
||||
<TextArea
|
||||
id="proposal-data"
|
||||
className="min-h-[200px]"
|
||||
|
||||
@@ -22,7 +22,6 @@ export const EpochTotalRewards = ({ currentEpoch }: EpochTotalRewardsProps) => {
|
||||
const { param: marketCreationQuantumMultiple } = useNetworkParam(
|
||||
'rewards_marketCreationQuantumMultiple'
|
||||
);
|
||||
console.log(marketCreationQuantumMultiple);
|
||||
const [page, setPage] = useState(1);
|
||||
const { data, loading, error, refetch } = useEpochAssetsRewardsQuery({
|
||||
notifyOnNetworkStatusChange: true,
|
||||
|
||||
@@ -133,24 +133,26 @@ export const RewardsPage = () => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="w-[360px]">
|
||||
<Toggle
|
||||
name="epoch-reward-view-toggle"
|
||||
toggles={[
|
||||
{
|
||||
label: t('totalDistributed'),
|
||||
value: 'total',
|
||||
},
|
||||
{
|
||||
label: t('earnedByMe'),
|
||||
value: 'individual',
|
||||
},
|
||||
]}
|
||||
checkedValue={toggleRewardsView}
|
||||
onChange={(e) =>
|
||||
setToggleRewardsView(e.target.value as RewardsView)
|
||||
}
|
||||
/>
|
||||
<div className="flex justify-end">
|
||||
<div className="w-full max-w-[360px]">
|
||||
<Toggle
|
||||
name="epoch-reward-view-toggle"
|
||||
toggles={[
|
||||
{
|
||||
label: t('totalDistributed'),
|
||||
value: 'total',
|
||||
},
|
||||
{
|
||||
label: t('earnedByMe'),
|
||||
value: 'individual',
|
||||
},
|
||||
]}
|
||||
checkedValue={toggleRewardsView}
|
||||
onChange={(e) =>
|
||||
setToggleRewardsView(e.target.value as RewardsView)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ const Home = ({ name }: RouteChildProps) => {
|
||||
</Link>
|
||||
</p>
|
||||
</HomeSection>
|
||||
<div className="flex gap-12">
|
||||
<div className="flex-1">
|
||||
<div className="flex justify-between flex-wrap gap-x-12 gap-y-4">
|
||||
<div className="flex-1 min-w-[360px]">
|
||||
<HomeSection>
|
||||
<SubHeading title={t('Staking')} />
|
||||
<p>
|
||||
@@ -118,7 +118,7 @@ const Home = ({ name }: RouteChildProps) => {
|
||||
</p>
|
||||
</HomeSection>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<div className="flex-1 min-w-[360px]">
|
||||
<HomeSection>
|
||||
<SubHeading title={t('Governance')} />
|
||||
<p>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply text-2xl text-white uppercase mb-4;
|
||||
}
|
||||
|
||||
+12
-11
@@ -1,27 +1,28 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml
|
||||
NX_VEGA_ENV=STAGNET1
|
||||
NX_VEGA_EXPLORER_URL=https://explorer.stagnet1.vega.rocks
|
||||
NX_SENTRY_DSN=https://2ffce43721964aafa78277c50654ece4@o286262.ingest.sentry.io/6300613
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml
|
||||
NX_VEGA_ENV=TESTNET
|
||||
NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf
|
||||
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
|
||||
NX_VEGA_TOKEN_URL=https://governance.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/main/announcements.json
|
||||
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
NX_VEGA_CONSOLE_URL=https://console.fairground.wtf
|
||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
||||
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||
|
||||
|
||||
# Cosmic elevator flags
|
||||
NX_SUCCESSOR_MARKETS=true
|
||||
NX_STOP_ORDERS=true
|
||||
# NX_ICEBERG_ORDERS
|
||||
NX_ICEBERG_ORDERS=true
|
||||
# NX_PRODUCT_PERPETUALS
|
||||
NX_METAMASK_SNAPS=true
|
||||
NX_METAMASK_SNAPS=false
|
||||
|
||||
NX_TENDERMINT_URL=https://tm.n01.stagnet1.vega.rocks
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.n01.stagnet1.vega.xyz/websocket
|
||||
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
||||
|
||||
@@ -39,7 +39,11 @@ export const MarketsPage = () => {
|
||||
id="proposed-markets"
|
||||
name={t('Proposed markets')}
|
||||
menu={
|
||||
<TradingAnchorButton size="extra-small" href={externalLink}>
|
||||
<TradingAnchorButton
|
||||
size="extra-small"
|
||||
data-testid="propose-new-market"
|
||||
href={externalLink}
|
||||
>
|
||||
{t('Propose a new market')}
|
||||
</TradingAnchorButton>
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ body,
|
||||
}
|
||||
|
||||
/**
|
||||
* ALLOTMENT
|
||||
* ALLOTMENT
|
||||
*/
|
||||
|
||||
html {
|
||||
@@ -81,6 +81,8 @@ html [data-theme='light'] {
|
||||
--pennant-color-macd-macd: theme(colors.vega.yellow.500);
|
||||
|
||||
--pennant-color-volume-sell: theme(colors.market.red.DEFAULT);
|
||||
|
||||
--pennant-candlestick-inner-padding: 0.1;
|
||||
}
|
||||
|
||||
html [data-theme='light'] {
|
||||
|
||||
@@ -7,7 +7,7 @@ envCmd=""
|
||||
|
||||
if [[ ! -z "${ENV_NAME}" ]]; then
|
||||
if [[ "${ENV_NAME}" != "ops-vega" ]]; then
|
||||
envCmd="envCmd="yarn env-cmd -f ./apps/${APP}/.env.${ENV_NAME}"
|
||||
envCmd="yarn env-cmd -f ./apps/${APP}/.env.${ENV_NAME}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@ WORKDIR /app
|
||||
ARG APP
|
||||
ARG ENV_NAME=""
|
||||
RUN apk add --update --no-cache \
|
||||
python3==3.10.11-r0 \
|
||||
make==4.3-r0 \
|
||||
gcc==11.2.1_git20220219-r2 \
|
||||
g++==11.2.1_git20220219-r2
|
||||
COPY . ./
|
||||
RUN yarn --network-timeout 100000 --pure-lockfile
|
||||
RUN yarn --pure-lockfile
|
||||
# work around for different build process in trading
|
||||
RUN sh docker/docker-build.sh
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/accounts",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/accounts",
|
||||
"tsConfig": "libs/accounts/tsconfig.lib.json",
|
||||
"project": "libs/accounts/package.json",
|
||||
"entryFile": "libs/accounts/src/index.ts",
|
||||
"external": ["react", "react-dom", "react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/accounts/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/announcements",
|
||||
"version": "0.0.2",
|
||||
"peerDependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
"version": "0.0.3"
|
||||
}
|
||||
|
||||
@@ -13,9 +13,15 @@
|
||||
"tsConfig": "libs/announcements/tsconfig.lib.json",
|
||||
"project": "libs/announcements/package.json",
|
||||
"entryFile": "libs/announcements/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"external": [
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"@vegaprotocol/react-helpers",
|
||||
"@vegaprotocol/ui-toolkit"
|
||||
],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"compiler": "swc",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/announcements/README.md",
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/apollo-client",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -4,16 +4,6 @@
|
||||
"sourceRoot": "libs/apollo-client/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/apollo-client",
|
||||
"main": "libs/apollo-client/src/index.ts",
|
||||
"tsConfig": "libs/apollo-client/tsconfig.lib.json",
|
||||
"assets": ["libs/apollo-client/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/assets",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/assets",
|
||||
"tsConfig": "libs/assets/tsconfig.lib.json",
|
||||
"project": "libs/assets/package.json",
|
||||
"entryFile": "libs/assets/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/assets/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/candles-chart",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/candles-chart",
|
||||
"tsConfig": "libs/candles-chart/tsconfig.lib.json",
|
||||
"project": "libs/candles-chart/package.json",
|
||||
"entryFile": "libs/candles-chart/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/candles-chart/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -3,6 +3,7 @@ import { CandlestickChart } from 'pennant';
|
||||
import { VegaDataSource } from './data-source';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
import { useMemo } from 'react';
|
||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||
import { useVegaWallet } from '@vegaprotocol/wallet';
|
||||
import { useThemeSwitcher } from '@vegaprotocol/react-helpers';
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
@@ -12,6 +13,8 @@ export type CandlesChartContainerProps = {
|
||||
marketId: string;
|
||||
};
|
||||
|
||||
const CANDLES_TO_WIDTH_FACTOR = 0.15;
|
||||
|
||||
export const CandlesChartContainer = ({
|
||||
marketId,
|
||||
}: CandlesChartContainerProps) => {
|
||||
@@ -27,24 +30,33 @@ export const CandlesChartContainer = ({
|
||||
}, [client, marketId, pubKey]);
|
||||
|
||||
return (
|
||||
<CandlestickChart
|
||||
dataSource={dataSource}
|
||||
options={{
|
||||
chartType,
|
||||
overlays,
|
||||
studies,
|
||||
notEnoughDataText: (
|
||||
<span className="text-xs text-center">{t('No data')}</span>
|
||||
),
|
||||
}}
|
||||
interval={interval}
|
||||
theme={theme}
|
||||
onOptionsChanged={(options) => {
|
||||
merge({
|
||||
overlays: options.overlays,
|
||||
studies: options.studies,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<AutoSizer>
|
||||
{({ width, height }) => (
|
||||
<div style={{ width, height }}>
|
||||
<CandlestickChart
|
||||
dataSource={dataSource}
|
||||
options={{
|
||||
chartType,
|
||||
overlays,
|
||||
studies,
|
||||
notEnoughDataText: (
|
||||
<span className="text-xs text-center">{t('No data')}</span>
|
||||
),
|
||||
initialNumCandlesToDisplay: Math.floor(
|
||||
width * CANDLES_TO_WIDTH_FACTOR
|
||||
),
|
||||
}}
|
||||
interval={interval}
|
||||
theme={theme}
|
||||
onOptionsChanged={(options) => {
|
||||
merge({
|
||||
overlays: options.overlays,
|
||||
studies: options.studies,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</AutoSizer>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/data-provider",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/data-provider",
|
||||
"tsConfig": "libs/data-provider/tsconfig.lib.json",
|
||||
"project": "libs/data-provider/package.json",
|
||||
"entryFile": "libs/data-provider/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/data-provider/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/datagrid",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/datagrid",
|
||||
"tsConfig": "libs/datagrid/tsconfig.lib.json",
|
||||
"project": "libs/datagrid/package.json",
|
||||
"entryFile": "libs/datagrid/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/datagrid/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/deal-ticket",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/deal-ticket",
|
||||
"tsConfig": "libs/deal-ticket/tsconfig.lib.json",
|
||||
"project": "libs/deal-ticket/package.json",
|
||||
"entryFile": "libs/deal-ticket/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/deal-ticket/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { addDecimalsFormatNumber } from '@vegaprotocol/utils';
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
import { Notification, Intent } from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
Intent,
|
||||
VegaIcon,
|
||||
VegaIconNames,
|
||||
Tooltip,
|
||||
TradingButton,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
|
||||
interface Props {
|
||||
margin: string;
|
||||
@@ -14,24 +20,43 @@ interface Props {
|
||||
}
|
||||
|
||||
export const MarginWarning = ({ margin, balance, asset, onDeposit }: Props) => {
|
||||
const description = (
|
||||
<div className="flex flex-col items-start gap-2 p-2">
|
||||
<p className="text-sm">
|
||||
{t('%s %s is currently required.', [
|
||||
addDecimalsFormatNumber(margin, asset.decimals),
|
||||
asset.symbol,
|
||||
])}
|
||||
</p>
|
||||
<p className="text-sm">
|
||||
{t('You have only %s.', [
|
||||
addDecimalsFormatNumber(balance, asset.decimals),
|
||||
])}
|
||||
</p>
|
||||
|
||||
<TradingButton
|
||||
intent={Intent.Warning}
|
||||
size="small"
|
||||
onClick={() => onDeposit(asset.id)}
|
||||
data-testid="deal-ticket-deposit-dialog-button"
|
||||
type="button"
|
||||
>
|
||||
{t('Deposit %s', [asset.symbol])}
|
||||
</TradingButton>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<Notification
|
||||
intent={Intent.Warning}
|
||||
testId="deal-ticket-warning-margin"
|
||||
message={`You may not have enough margin available to open this position. ${addDecimalsFormatNumber(
|
||||
margin,
|
||||
asset.decimals
|
||||
)} ${asset.symbol} ${t(
|
||||
'is currently required. You have only'
|
||||
)} ${addDecimalsFormatNumber(balance, asset.decimals)} ${
|
||||
asset.symbol
|
||||
} ${t('available.')}`}
|
||||
buttonProps={{
|
||||
text: t(`Deposit ${asset.symbol}`),
|
||||
action: () => onDeposit(asset.id),
|
||||
dataTestId: 'deal-ticket-deposit-dialog-button',
|
||||
size: 'small',
|
||||
}}
|
||||
/>
|
||||
<Tooltip description={description}>
|
||||
<div
|
||||
className="flex text-xs items-center"
|
||||
data-testid="deal-ticket-warning-margin"
|
||||
>
|
||||
<span className="text-yellow-500 mr-2">
|
||||
<VegaIcon name={VegaIconNames.WARNING} />
|
||||
</span>
|
||||
{t('You may not have enough margin available to open this position.')}
|
||||
</div>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -11,8 +11,7 @@ import { AccountBreakdownDialog } from '@vegaprotocol/accounts';
|
||||
import { formatRange, formatValue } from '@vegaprotocol/utils';
|
||||
import { marketMarginDataProvider } from '@vegaprotocol/accounts';
|
||||
import { useDataProvider } from '@vegaprotocol/data-provider';
|
||||
|
||||
import * as Accordion from '@radix-ui/react-accordion';
|
||||
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
||||
|
||||
import {
|
||||
MARGIN_DIFF_TOOLTIP_TEXT,
|
||||
@@ -24,7 +23,13 @@ import {
|
||||
} from '../../constants';
|
||||
import { useEstimateFees } from '../../hooks';
|
||||
import { KeyValue } from './key-value';
|
||||
import { TOOLTIP_TRIGGER_CLASS_NAME } from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
Accordion,
|
||||
AccordionChevron,
|
||||
AccordionPanel,
|
||||
Tooltip,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import classNames from 'classnames';
|
||||
|
||||
const emptyValue = '-';
|
||||
|
||||
@@ -246,31 +251,56 @@ export const DealTicketMarginDetails = ({
|
||||
const quoteName = market.tradableInstrument.instrument.product.quoteName;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Accordion.Root type="single" collapsible>
|
||||
<Accordion.Item value="margin">
|
||||
<KeyValue
|
||||
id="margin-required"
|
||||
label={
|
||||
<Accordion.Trigger className={TOOLTIP_TRIGGER_CLASS_NAME}>
|
||||
{t('Margin required')}
|
||||
</Accordion.Trigger>
|
||||
}
|
||||
value={formatRange(
|
||||
marginRequiredBestCase,
|
||||
marginRequiredWorstCase,
|
||||
assetDecimals
|
||||
)}
|
||||
formattedValue={formatRange(
|
||||
marginRequiredBestCase,
|
||||
marginRequiredWorstCase,
|
||||
assetDecimals,
|
||||
quantum
|
||||
)}
|
||||
labelDescription={MARGIN_DIFF_TOOLTIP_TEXT(assetSymbol)}
|
||||
symbol={assetSymbol}
|
||||
/>
|
||||
<Accordion.Content>
|
||||
<div className="flex flex-col gap-2 w-full">
|
||||
<Accordion>
|
||||
<AccordionPanel
|
||||
itemId="margin"
|
||||
trigger={
|
||||
<AccordionPrimitive.Trigger
|
||||
data-testid="accordion-toggle"
|
||||
className={classNames(
|
||||
'w-full pt-2',
|
||||
'flex items-center gap-2 text-xs',
|
||||
'group'
|
||||
)}
|
||||
>
|
||||
<div
|
||||
data-testid={`deal-ticket-fee-margin-required`}
|
||||
key={'value-dropdown'}
|
||||
className="flex items-center gap-2 justify-between w-full"
|
||||
>
|
||||
<div className="flex items-center gap-1">
|
||||
<Tooltip description={MARGIN_DIFF_TOOLTIP_TEXT(assetSymbol)}>
|
||||
<span className="text-muted">{t('Margin required')}</span>
|
||||
</Tooltip>
|
||||
|
||||
<AccordionChevron size={10} />
|
||||
</div>
|
||||
<Tooltip
|
||||
description={
|
||||
formatRange(
|
||||
marginRequiredBestCase,
|
||||
marginRequiredWorstCase,
|
||||
assetDecimals
|
||||
) ?? '-'
|
||||
}
|
||||
noUnderline
|
||||
>
|
||||
<div className="font-mono text-right">
|
||||
{formatRange(
|
||||
marginRequiredBestCase,
|
||||
marginRequiredWorstCase,
|
||||
assetDecimals,
|
||||
quantum
|
||||
)}{' '}
|
||||
{assetSymbol || ''}
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</AccordionPrimitive.Trigger>
|
||||
}
|
||||
>
|
||||
<div className="flex flex-col gap-2 w-full">
|
||||
<KeyValue
|
||||
label={t('Total margin available')}
|
||||
indent
|
||||
@@ -310,12 +340,12 @@ export const DealTicketMarginDetails = ({
|
||||
quantum
|
||||
)}
|
||||
/>
|
||||
</Accordion.Content>
|
||||
</Accordion.Item>
|
||||
</Accordion.Root>
|
||||
</div>
|
||||
</AccordionPanel>
|
||||
</Accordion>
|
||||
{projectedMargin}
|
||||
<KeyValue
|
||||
label={t('Liquidation price estimate')}
|
||||
label={t('Liquidation')}
|
||||
value={liquidationPriceEstimate}
|
||||
formattedValue={liquidationPriceEstimate}
|
||||
symbol={quoteName}
|
||||
@@ -329,6 +359,6 @@ export const DealTicketMarginDetails = ({
|
||||
onClose={onAccountBreakdownDialogClose}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -78,8 +78,18 @@ const triggerPriceWarningMessage = 'stop-order-warning-message-trigger-price';
|
||||
const triggerTrailingPercentOffsetErrorMessage =
|
||||
'stop-order-error-message-trigger-trailing-percent-offset';
|
||||
|
||||
const numberOfActiveOrdersLimit = 'stop-order-warning-limit';
|
||||
|
||||
const ocoPostfix = (id: string, postfix = true) => (postfix ? `${id}-oco` : id);
|
||||
|
||||
const mockDataProvider = jest.fn((...args) => ({
|
||||
data: Array(0),
|
||||
}));
|
||||
jest.mock('@vegaprotocol/data-provider', () => ({
|
||||
...jest.requireActual('@vegaprotocol/data-provider'),
|
||||
useDataProvider: jest.fn((...args) => mockDataProvider(...args)),
|
||||
}));
|
||||
|
||||
describe('StopOrder', () => {
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
@@ -460,4 +470,26 @@ describe('StopOrder', () => {
|
||||
new Date(screen.getByTestId<HTMLInputElement>(datePicker).value).getTime()
|
||||
).toEqual(now);
|
||||
});
|
||||
|
||||
it('shows limit of active stop orders number', async () => {
|
||||
mockDataProvider.mockReturnValue({
|
||||
data: Array(4),
|
||||
});
|
||||
render(generateJsx());
|
||||
expect(mockDataProvider.mock.lastCall?.[0].skip).toBe(true);
|
||||
await userEvent.type(screen.getByTestId(sizeInput), '0.01');
|
||||
expect(mockDataProvider.mock.lastCall?.[0].skip).toBe(false);
|
||||
expect(screen.getByTestId(numberOfActiveOrdersLimit)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('counts oco as two orders', async () => {
|
||||
mockDataProvider.mockReturnValue({
|
||||
data: Array(3),
|
||||
});
|
||||
render(generateJsx());
|
||||
await userEvent.type(screen.getByTestId(sizeInput), '0.01');
|
||||
expect(screen.queryByTestId(numberOfActiveOrdersLimit)).toBeNull();
|
||||
await userEvent.click(screen.getByTestId(oco));
|
||||
expect(screen.getByTestId(numberOfActiveOrdersLimit)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
TradingButton as Button,
|
||||
Pill,
|
||||
Intent,
|
||||
Notification,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { getDerivedPrice } from '@vegaprotocol/markets';
|
||||
import type { Market } from '@vegaprotocol/markets';
|
||||
@@ -53,6 +54,8 @@ import { DealTicketFeeDetails } from './deal-ticket-fee-details';
|
||||
import { validateExpiration } from '../../utils';
|
||||
import { NOTIONAL_SIZE_TOOLTIP_TEXT } from '../../constants';
|
||||
import { KeyValue } from './key-value';
|
||||
import { useDataProvider } from '@vegaprotocol/data-provider';
|
||||
import { stopOrdersProvider } from '@vegaprotocol/orders';
|
||||
|
||||
export interface StopOrderProps {
|
||||
market: Market;
|
||||
@@ -60,6 +63,8 @@ export interface StopOrderProps {
|
||||
submit: (order: StopOrdersSubmission) => void;
|
||||
}
|
||||
|
||||
const MAX_NUMBER_OF_ACTIVE_STOP_ORDERS = 4;
|
||||
const POLLING_TIME = 2000;
|
||||
const trailingPercentOffsetStep = '0.1';
|
||||
|
||||
const getDefaultValues = (
|
||||
@@ -533,7 +538,7 @@ const NotionalAndFees = ({
|
||||
market.positionDecimalPlaces
|
||||
);
|
||||
return (
|
||||
<div className="mb-4">
|
||||
<div className="mb-4 flex flex-col gap-2 w-full">
|
||||
<KeyValue
|
||||
label={t('Notional')}
|
||||
value={formatValue(notionalSize, market.decimalPlaces)}
|
||||
@@ -802,6 +807,27 @@ export const StopOrder = ({ market, marketPrice, submit }: StopOrderProps) => {
|
||||
const triggerTrailingPercentOffset = watch('triggerTrailingPercentOffset');
|
||||
const triggerType = watch('triggerType');
|
||||
|
||||
const { data: activeStopOrders, reload } = useDataProvider({
|
||||
dataProvider: stopOrdersProvider,
|
||||
variables: {
|
||||
filter: {
|
||||
parties: pubKey ? [pubKey] : [],
|
||||
markets: [market.id],
|
||||
liveOnly: true,
|
||||
},
|
||||
},
|
||||
skip: !(pubKey && (formState.isDirty || formState.submitCount)),
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
reload();
|
||||
}, POLLING_TIME);
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, [reload]);
|
||||
|
||||
useEffect(() => {
|
||||
const storedSize = storedFormValues?.[dealTicketType]?.size;
|
||||
if (storedSize && size !== storedSize) {
|
||||
@@ -864,7 +890,6 @@ export const StopOrder = ({ market, marketPrice, submit }: StopOrderProps) => {
|
||||
{errors.type.message}
|
||||
</InputError>
|
||||
)}
|
||||
|
||||
<Controller
|
||||
name="side"
|
||||
control={control}
|
||||
@@ -1095,6 +1120,20 @@ export const StopOrder = ({ market, marketPrice, submit }: StopOrderProps) => {
|
||||
</>
|
||||
)}
|
||||
<NoWalletWarning isReadOnly={isReadOnly} />
|
||||
{(activeStopOrders?.length ?? 0) + (oco ? 2 : 1) >
|
||||
MAX_NUMBER_OF_ACTIVE_STOP_ORDERS ? (
|
||||
<div className="mb-2">
|
||||
<Notification
|
||||
intent={Intent.Warning}
|
||||
testId={'stop-order-warning-limit'}
|
||||
message={t(
|
||||
'There is a limit of %s active stop orders per market. Orders submitted above the limit will be immediately rejected.',
|
||||
[MAX_NUMBER_OF_ACTIVE_STOP_ORDERS.toString()]
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<SubmitButton
|
||||
assetUnit={assetUnit}
|
||||
market={market}
|
||||
|
||||
@@ -464,7 +464,7 @@ export const DealTicket = ({
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
<div className="mb-4">
|
||||
<div className="mb-4 flex flex-col gap-2 w-full">
|
||||
<KeyValue
|
||||
label={t('Notional')}
|
||||
value={formatValue(notionalSize, market.decimalPlaces)}
|
||||
|
||||
@@ -25,11 +25,11 @@ export const KeyValue = ({
|
||||
}: KeyValuePros) => {
|
||||
const displayValue = `${formattedValue ?? '-'} ${symbol || ''}`;
|
||||
const valueElement = onClick ? (
|
||||
<button onClick={onClick} className="text-muted">
|
||||
<button onClick={onClick} className="font-mono">
|
||||
{displayValue}
|
||||
</button>
|
||||
) : (
|
||||
<div className="text-muted">{displayValue}</div>
|
||||
<div className="font-mono">{displayValue}</div>
|
||||
);
|
||||
return (
|
||||
<div
|
||||
@@ -40,14 +40,14 @@ export const KeyValue = ({
|
||||
}`}
|
||||
key={typeof label === 'string' ? label : 'value-dropdown'}
|
||||
className={classnames(
|
||||
'text-xs mt-2 flex justify-between items-center gap-4 flex-wrap',
|
||||
'text-xs flex justify-between items-center gap-4 flex-wrap',
|
||||
{ 'ml-2': indent }
|
||||
)}
|
||||
>
|
||||
<Tooltip description={labelDescription}>
|
||||
<div>{label}</div>
|
||||
<div className="text-muted">{label}</div>
|
||||
</Tooltip>
|
||||
<Tooltip description={`${value ?? '-'} ${symbol || ''}`}>
|
||||
<Tooltip description={`${value ?? '-'} ${symbol || ''}`} noUnderline>
|
||||
{valueElement}
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ export const EST_MARGIN_TOOLTIP_TEXT = (settlementAsset: string) =>
|
||||
[settlementAsset]
|
||||
);
|
||||
export const EST_TOTAL_MARGIN_TOOLTIP_TEXT = t(
|
||||
'Estimated total margin that will cover open position, active orders and this order.'
|
||||
'Estimated total margin that will cover open positions, active orders and this order.'
|
||||
);
|
||||
export const MARGIN_ACCOUNT_TOOLTIP_TEXT = t('Margin account balance.');
|
||||
export const MARGIN_DIFF_TOOLTIP_TEXT = (settlementAsset: string) =>
|
||||
@@ -60,7 +60,7 @@ export const EST_FEES_TOOLTIP_TEXT = t(
|
||||
);
|
||||
|
||||
export const LIQUIDATION_PRICE_ESTIMATE_TOOLTIP_TEXT = t(
|
||||
'This is a approximation to the liquidation price for that particular contract position, assuming nothing else changes, which may affect your margin and collateral balances.'
|
||||
'This is an approximation (or a range) for the liquidation price for that particular contract position, assuming nothing else changes, which may affect your margin and collateral balances.'
|
||||
);
|
||||
|
||||
export const EST_SLIPPAGE = t(
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/deposits",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/deposits",
|
||||
"tsConfig": "libs/deposits/tsconfig.lib.json",
|
||||
"project": "libs/deposits/package.json",
|
||||
"entryFile": "libs/deposits/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/deposits/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/environment",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/environment",
|
||||
"tsConfig": "libs/environment/tsconfig.lib.json",
|
||||
"project": "libs/environment/package.json",
|
||||
"entryFile": "libs/environment/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/environment/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -159,6 +159,7 @@ export const ExternalLinks = {
|
||||
DISCORD: 'https://vega.xyz/discord',
|
||||
GOVERNANCE_PAGE: 'https://vega.xyz/governance',
|
||||
VALIDATOR_FORUM: 'https://community.vega.xyz/c/mainnet-validator-candidates',
|
||||
PROPOSALS_FORUM: 'https://community.vega.xyz/c/governance/25',
|
||||
MARGIN_CREDIT_RISK:
|
||||
'https://vega.xyz/papers/margins-and-credit-risk.pdf#page=7',
|
||||
VEGA_WALLET_URL: 'https://vega.xyz/wallet',
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/fills",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/fills",
|
||||
"tsConfig": "libs/fills/tsconfig.lib.json",
|
||||
"project": "libs/fills/package.json",
|
||||
"entryFile": "libs/fills/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/fills/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@vegaprotocol/i18n",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
+1
-11
@@ -7,6 +7,7 @@
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"format": ["esm", "cjs"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/i18n",
|
||||
"main": "libs/i18n/src/index.ts",
|
||||
@@ -14,17 +15,6 @@
|
||||
"assets": ["libs/i18n/*.md"]
|
||||
}
|
||||
},
|
||||
"publish": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"command": "node tools/scripts/publish.mjs i18n {args.ver} {args.tag}"
|
||||
},
|
||||
"dependsOn": [
|
||||
{
|
||||
"target": "build"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/ledger",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -4,26 +4,6 @@
|
||||
"sourceRoot": "libs/ledger/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/ledger",
|
||||
"tsConfig": "libs/ledger/tsconfig.lib.json",
|
||||
"project": "libs/ledger/package.json",
|
||||
"entryFile": "libs/ledger/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/ledger/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/liquidity",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/liquidity",
|
||||
"tsConfig": "libs/liquidity/tsconfig.lib.json",
|
||||
"project": "libs/liquidity/package.json",
|
||||
"entryFile": "libs/liquidity/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/liquidity/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/logger",
|
||||
"version": "0.0.1",
|
||||
"type": "commonjs"
|
||||
}
|
||||
@@ -5,17 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"format": ["esm", "cjs"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/logger",
|
||||
"main": "libs/logger/src/index.ts",
|
||||
"tsConfig": "libs/logger/tsconfig.lib.json",
|
||||
"assets": ["libs/logger/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/market-depth",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/market-depth",
|
||||
"tsConfig": "libs/market-depth/tsconfig.lib.json",
|
||||
"project": "libs/market-depth/package.json",
|
||||
"entryFile": "libs/market-depth/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/market-depth/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/markets",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/markets",
|
||||
"tsConfig": "libs/markets/tsconfig.lib.json",
|
||||
"project": "libs/markets/package.json",
|
||||
"entryFile": "libs/markets/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/markets/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/network-info",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/network-info",
|
||||
"tsConfig": "libs/network-info/tsconfig.lib.json",
|
||||
"project": "libs/network-info/package.json",
|
||||
"entryFile": "libs/network-info/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/network-info/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/network-parameters",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/network-parameters",
|
||||
"tsConfig": "libs/network-parameters/tsconfig.lib.json",
|
||||
"project": "libs/network-parameters/package.json",
|
||||
"entryFile": "libs/network-parameters/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/network-parameters/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/network-stats",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/network-stats",
|
||||
"tsConfig": "libs/network-stats/tsconfig.lib.json",
|
||||
"project": "libs/network-stats/package.json",
|
||||
"entryFile": "libs/network-stats/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/network-stats/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/orders",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/orders",
|
||||
"tsConfig": "libs/orders/tsconfig.lib.json",
|
||||
"project": "libs/orders/package.json",
|
||||
"entryFile": "libs/orders/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/orders/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -144,8 +144,8 @@ fragment StopOrderFields on StopOrder {
|
||||
}
|
||||
}
|
||||
|
||||
query StopOrders($partyId: ID!) {
|
||||
stopOrders(filter: { parties: [$partyId] }) {
|
||||
query StopOrders($filter: StopOrderFilter) {
|
||||
stopOrders(filter: $filter) {
|
||||
edges {
|
||||
node {
|
||||
...StopOrderFields
|
||||
|
||||
+5
-5
@@ -37,7 +37,7 @@ export type OrderSubmissionFieldsFragment = { __typename?: 'OrderSubmission', ma
|
||||
export type StopOrderFieldsFragment = { __typename?: 'StopOrder', id: string, ocoLinkId?: string | null, expiresAt?: any | null, expiryStrategy?: Types.StopOrderExpiryStrategy | null, triggerDirection: Types.StopOrderTriggerDirection, status: Types.StopOrderStatus, createdAt: any, updatedAt?: any | null, partyId: string, marketId: string, order?: { __typename?: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename?: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, icebergOrder?: { __typename: 'IcebergOrder', peakSize: string, minimumVisibleSize: string, reservedRemaining: string } | null } | null, trigger: { __typename?: 'StopOrderPrice', price: string } | { __typename?: 'StopOrderTrailingPercentOffset', trailingPercentOffset: string }, submission: { __typename?: 'OrderSubmission', marketId: string, price: string, size: string, side: Types.Side, timeInForce: Types.OrderTimeInForce, expiresAt: any, type: Types.OrderType, reference?: string | null, postOnly?: boolean | null, reduceOnly?: boolean | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null } };
|
||||
|
||||
export type StopOrdersQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
filter?: Types.InputMaybe<Types.StopOrderFilter>;
|
||||
}>;
|
||||
|
||||
|
||||
@@ -283,8 +283,8 @@ export function useOrdersUpdateSubscription(baseOptions: Apollo.SubscriptionHook
|
||||
export type OrdersUpdateSubscriptionHookResult = ReturnType<typeof useOrdersUpdateSubscription>;
|
||||
export type OrdersUpdateSubscriptionResult = Apollo.SubscriptionResult<OrdersUpdateSubscription>;
|
||||
export const StopOrdersDocument = gql`
|
||||
query StopOrders($partyId: ID!) {
|
||||
stopOrders(filter: {parties: [$partyId]}) {
|
||||
query StopOrders($filter: StopOrderFilter) {
|
||||
stopOrders(filter: $filter) {
|
||||
edges {
|
||||
node {
|
||||
...StopOrderFields
|
||||
@@ -306,11 +306,11 @@ export const StopOrdersDocument = gql`
|
||||
* @example
|
||||
* const { data, loading, error } = useStopOrdersQuery({
|
||||
* variables: {
|
||||
* partyId: // value for 'partyId'
|
||||
* filter: // value for 'filter'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useStopOrdersQuery(baseOptions: Apollo.QueryHookOptions<StopOrdersQuery, StopOrdersQueryVariables>) {
|
||||
export function useStopOrdersQuery(baseOptions?: Apollo.QueryHookOptions<StopOrdersQuery, StopOrdersQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<StopOrdersQuery, StopOrdersQueryVariables>(StopOrdersDocument, options);
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './__generated__/Orders';
|
||||
export * from './order-data-provider';
|
||||
export * from './stop-orders-data-provider';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { StopOrder } from '../order-data-provider/stop-orders-data-provider
|
||||
import { useDataProvider } from '@vegaprotocol/data-provider';
|
||||
import { stopOrdersWithMarketProvider } from '../order-data-provider/stop-orders-data-provider';
|
||||
import { OrderViewDialog } from '../order-list/order-view-dialog';
|
||||
import type { Order } from '../order-data-provider';
|
||||
import type { Order, StopOrdersQueryVariables } from '../order-data-provider';
|
||||
|
||||
export interface StopOrdersManagerProps {
|
||||
partyId: string;
|
||||
@@ -26,7 +26,11 @@ export const StopOrdersManager = ({
|
||||
}: StopOrdersManagerProps) => {
|
||||
const create = useVegaTransactionStore((state) => state.create);
|
||||
const [viewOrder, setViewOrder] = useState<Order | null>(null);
|
||||
const variables = { partyId };
|
||||
const variables: StopOrdersQueryVariables = {
|
||||
filter: {
|
||||
parties: [partyId],
|
||||
},
|
||||
};
|
||||
|
||||
const { data, error, reload } = useDataProvider({
|
||||
dataProvider: stopOrdersWithMarketProvider,
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/positions",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/positions",
|
||||
"tsConfig": "libs/positions/tsconfig.lib.json",
|
||||
"project": "libs/positions/package.json",
|
||||
"entryFile": "libs/positions/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/positions/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/proposals",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/proposals",
|
||||
"tsConfig": "libs/proposals/tsconfig.lib.json",
|
||||
"project": "libs/proposals/package.json",
|
||||
"entryFile": "libs/proposals/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/proposals/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/react-helpers",
|
||||
"version": "0.2.5",
|
||||
"peerDependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
"version": "0.2.6"
|
||||
}
|
||||
|
||||
@@ -9,14 +9,19 @@
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"outputPath": "dist/libs/react-helpers",
|
||||
"tsConfig": "libs/react-helpers/tsconfig.lib.json",
|
||||
"project": "libs/react-helpers/package.json",
|
||||
"entryFile": "libs/react-helpers/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"external": [
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"@vegaprotocol/tailwindcss-config",
|
||||
"@vegaprotocol/utils"
|
||||
],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"compiler": "swc",
|
||||
"format": ["esm", "cjs"],
|
||||
"assets": [
|
||||
{
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/smart-contracts",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -3,16 +3,6 @@
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/smart-contracts/src",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/smart-contracts",
|
||||
"main": "libs/smart-contracts/src/index.ts",
|
||||
"tsConfig": "libs/smart-contracts/tsconfig.lib.json",
|
||||
"assets": ["libs/smart-contracts/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/tailwindcss-config",
|
||||
"version": "0.0.4"
|
||||
"version": "0.0.5"
|
||||
}
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
"outputPath": "dist/libs/tailwindcss-config",
|
||||
"main": "libs/tailwindcss-config/src/index.js",
|
||||
"tsConfig": "libs/tailwindcss-config/tsconfig.lib.json",
|
||||
"assets": ["libs/tailwindcss-config/*.md"],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies"
|
||||
"assets": ["libs/tailwindcss-config/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/tendermint",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -12,26 +12,6 @@
|
||||
"lintFilePatterns": ["libs/tendermint/**/*.{ts,tsx,js,jsx}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/tendermint",
|
||||
"tsConfig": "libs/tendermint/tsconfig.lib.json",
|
||||
"project": "libs/tendermint/package.json",
|
||||
"entryFile": "libs/tendermint/src/index.ts",
|
||||
"external": ["react", "react-dom", "react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/tendermint/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "@vegaprotocol/trades",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -5,26 +5,6 @@
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/trades",
|
||||
"tsConfig": "libs/trades/tsconfig.lib.json",
|
||||
"project": "libs/trades/package.json",
|
||||
"entryFile": "libs/trades/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/trades/README.md",
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/types",
|
||||
"version": "0.0.5"
|
||||
"version": "0.0.6"
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
"tsConfig": "libs/types/tsconfig.lib.json",
|
||||
"project": "libs/types/package.json",
|
||||
"entryFile": "libs/types/src/index.ts",
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"format": ["esm", "cjs"],
|
||||
@@ -23,8 +22,7 @@
|
||||
"input": ".",
|
||||
"output": "."
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user