Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72a8571372 | ||
|
|
3f60aae99e | ||
|
|
ae15794739 | ||
|
|
f142e37f15 | ||
|
|
1847381cf2 | ||
|
|
5f6e979fd4 | ||
|
|
6b0942fc48 | ||
|
|
b65153b611 | ||
|
|
1a1f1e2daf | ||
|
|
58205e976e | ||
|
|
e55ecc4983 | ||
|
|
ea24d0fdb9 | ||
|
|
e56271bcdb | ||
|
|
d458559074 | ||
|
|
414919bbf4 | ||
|
|
ae5f6d5a14 |
@@ -1,6 +1,6 @@
|
|||||||
# Related issues 🔗
|
# Related issues 🔗
|
||||||
|
|
||||||
Closes #[Issue number here]
|
Issue: #[Issue number here]
|
||||||
|
|
||||||
# Description ℹ️
|
# Description ℹ️
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
jobs:
|
jobs:
|
||||||
node-modules:
|
node-modules:
|
||||||
# All jobs depend on node_modules, so none should run if the PR is in draft
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
name: 'Cache yarn modules'
|
name: 'Cache yarn modules'
|
||||||
steps:
|
steps:
|
||||||
@@ -177,14 +175,14 @@ jobs:
|
|||||||
preview_explorer: ${{ env.PREVIEW_EXPLORER }}
|
preview_explorer: ${{ env.PREVIEW_EXPLORER }}
|
||||||
preview_tools: ${{ env.PREVIEW_TOOLS }}
|
preview_tools: ${{ env.PREVIEW_TOOLS }}
|
||||||
|
|
||||||
# console-e2e:
|
console-e2e:
|
||||||
# needs: build-sources
|
needs: build-sources
|
||||||
# name: '(CI) console python'
|
name: '(CI) console python'
|
||||||
# uses: ./.github/workflows/console-test-run.yml
|
uses: ./.github/workflows/console-test-run.yml
|
||||||
# secrets: inherit
|
secrets: inherit
|
||||||
# if: ${{ contains(fromJSON(needs.build-sources.outputs.projects), 'trading') && github.event_name == 'pull_request' }}
|
if: ${{ contains(fromJSON(needs.build-sources.outputs.projects), 'trading') && github.event_name == 'pull_request' }}
|
||||||
# with:
|
with:
|
||||||
# github-sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
github-sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
|
||||||
cypress:
|
cypress:
|
||||||
needs: build-sources
|
needs: build-sources
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
name: (CI) Console tests
|
name: (CI) Console tests
|
||||||
|
|
||||||
env:
|
|
||||||
VEGA_VERSION: v0.72.14
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -14,7 +11,7 @@ jobs:
|
|||||||
run-tests:
|
run-tests:
|
||||||
name: run-tests
|
name: run-tests
|
||||||
runs-on: console-test
|
runs-on: console-test
|
||||||
timeout-minutes: 40
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# check-out frontend-monorepo
|
# check-out frontend-monorepo
|
||||||
@@ -70,39 +67,23 @@ jobs:
|
|||||||
repository: vegaprotocol/console-test
|
repository: vegaprotocol/console-test
|
||||||
path: './console-test'
|
path: './console-test'
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# install dependencies
|
# install dependencies if cache does not exist
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: ./console-test
|
working-directory: ./console-test
|
||||||
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
run: poetry install --no-interaction --no-root
|
run: poetry install --no-interaction --no-root
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# find vega binaries path
|
# install vega binaries
|
||||||
#----------------------------------------------
|
|
||||||
- name: Find vega binaries path
|
|
||||||
id: vega_bin_path
|
|
||||||
working-directory: ./console-test
|
|
||||||
run: echo path=$(poetry run python -c "import vega_sim; print(vega_sim.vega_bin_path)") >> $GITHUB_OUTPUT
|
|
||||||
#----------------------------------------------
|
|
||||||
# vega binaries cache
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Vega binaries cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: vega_binaries_cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.vega_bin_path.outputs.path }}
|
|
||||||
key: ${{ runner.os }}-vega-binaries-${{ env.VEGA_VERSION }}
|
|
||||||
#----------------------------------------------
|
|
||||||
# install vega binaries
|
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
- name: Install vega binaries
|
- name: Install vega binaries
|
||||||
working-directory: ./console-test
|
working-directory: ./console-test
|
||||||
if: steps.vega_binaries_cache.outputs.cache-hit != 'true'
|
run: poetry run python -m vega_sim.tools.load_binaries --force
|
||||||
run: poetry run python -m vega_sim.tools.load_binaries --force --version $VEGA_VERSION
|
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# install playwright
|
# install playwright
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
- name: install playwright
|
- name: install playwright
|
||||||
run: poetry run playwright install --with-deps chromium
|
run: poetry run playwright install
|
||||||
working-directory: ./console-test
|
working-directory: ./console-test
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
# run tests
|
# run tests
|
||||||
|
|||||||
@@ -155,10 +155,10 @@ jobs:
|
|||||||
- name: Sanity check docker image
|
- name: Sanity check docker image
|
||||||
run: |
|
run: |
|
||||||
echo "Check ipfs-hash"
|
echo "Check ipfs-hash"
|
||||||
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local /bin/sh -c 'cat /ipfs-hash'
|
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local cat /ipfs-hash
|
||||||
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local /bin/sh -c 'cat /ipfs-hash' > ${{ matrix.app }}-ipfs-hash
|
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local cat /ipfs-hash > ${{ matrix.app }}-ipfs-hash
|
||||||
echo "List html directory"
|
echo "List html directory"
|
||||||
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local /bin/sh -c 'apk add --update tree; tree /usr/share/nginx/html'
|
docker run --rm ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local sh -c 'apk add --update tree; tree /usr/share/nginx/html'
|
||||||
|
|
||||||
- name: Publish dist as docker image (ghcr)
|
- name: Publish dist as docker image (ghcr)
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
@@ -329,9 +329,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# create commit
|
# create commit
|
||||||
if ! git diff --cached --exit-code; then
|
commit_msg="Automated hash update from ${{ github.ref }}"
|
||||||
commit_msg="Automated hash update from ${{ github.ref }}"
|
git commit -m "$commit_msg"
|
||||||
git commit -m "$commit_msg"
|
git push -u origin "main"
|
||||||
git push -u origin "main"
|
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -113,20 +113,6 @@ In order to run a container on port 3000:
|
|||||||
docker run -p 3000:80 [TAG]
|
docker run -p 3000:80 [TAG]
|
||||||
```
|
```
|
||||||
|
|
||||||
On top of that there are two possible scenarios for running docker image - using nginx server (default) of ipfs daemon.
|
|
||||||
|
|
||||||
to run ipfs on port 3000:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -p 3000:80 [TAG] /run-ipfs.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
to run nginx on port 3000:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -p 3000:80 [TAG]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build instructions
|
## 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.
|
||||||
@@ -164,7 +150,7 @@ As a prerequisite you need to perform build of `dist` directory and move its con
|
|||||||
You can build any of the containers locally with the following command:
|
You can build any of the containers locally with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -f docker/node-outside-docker.Dockerfile . --tag=[TAG]
|
docker build --dockerfile docker/node-outside-docker.Dockerfile . --tag=[TAG]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Verifying ipfs-hash of existing current application version
|
### Verifying ipfs-hash of existing current application version
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://n04.d.vega.xyz/tm/websocket
|
|||||||
NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql
|
NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql
|
||||||
NX_VEGA_ENV=DEVNET
|
NX_VEGA_ENV=DEVNET
|
||||||
NX_BLOCK_EXPLORER=https://be.devnet1.vega.xyz/rest
|
NX_BLOCK_EXPLORER=https://be.devnet1.vega.xyz/rest
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# App flags
|
# App flags
|
||||||
NX_EXPLORER_ASSETS=1
|
NX_EXPLORER_ASSETS=1
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://mainnet-observer-proxy01.ops.vega.xyz/websocke
|
|||||||
NX_VEGA_URL=https://api.vega.community/graphql
|
NX_VEGA_URL=https://api.vega.community/graphql
|
||||||
NX_VEGA_ENV=MAINNET
|
NX_VEGA_ENV=MAINNET
|
||||||
NX_BLOCK_EXPLORER=https://be.explorer.vega.xyz/rest
|
NX_BLOCK_EXPLORER=https://be.explorer.vega.xyz/rest
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
# App flags
|
# App flags
|
||||||
NX_EXPLORER_ASSETS=1
|
NX_EXPLORER_ASSETS=1
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://lb.testnet.vega.xyz/tm/websocket
|
|||||||
NX_VEGA_URL=https://api.n07.testnet.vega.xyz/graphql
|
NX_VEGA_URL=https://api.n07.testnet.vega.xyz/graphql
|
||||||
NX_VEGA_ENV=TESTNET
|
NX_VEGA_ENV=TESTNET
|
||||||
NX_BLOCK_EXPLORER=https://be.testnet.vega.xyz/rest
|
NX_BLOCK_EXPLORER=https://be.testnet.vega.xyz/rest
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
# App flags
|
# App flags
|
||||||
NX_EXPLORER_ASSETS=1
|
NX_EXPLORER_ASSETS=1
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ function getSuccessorTxBody(parentMarketId) {
|
|||||||
positionDecimalPlaces: '5',
|
positionDecimalPlaces: '5',
|
||||||
linearSlippageFactor: '0.001',
|
linearSlippageFactor: '0.001',
|
||||||
quadraticSlippageFactor: '0',
|
quadraticSlippageFactor: '0',
|
||||||
|
lpPriceRange: '10',
|
||||||
instrument: {
|
instrument: {
|
||||||
name: 'Token test market',
|
name: 'Token test market',
|
||||||
code: 'TEST.24h',
|
code: 'TEST.24h',
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ NX_VEGA_ENV=CUSTOM
|
|||||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=/
|
NX_VEGA_EXPLORER_URL=/
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
# App flags
|
# App flags
|
||||||
NX_EXPLORER_TXS_LIST=0
|
NX_EXPLORER_TXS_LIST=0
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ NX_VEGA_URL=https://api.devnet1.vega.xyz/graphql
|
|||||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml
|
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=/
|
NX_VEGA_EXPLORER_URL=/
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ NX_VEGA_GOVERNANCE_URL=https://governance.vega.xyz
|
|||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=https://explorer.vega.xyz/
|
NX_VEGA_EXPLORER_URL=https://explorer.vega.xyz/
|
||||||
NX_VEGA_CONSOLE_URL=https://console.vega.xyz
|
NX_VEGA_CONSOLE_URL=https://console.vega.xyz
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.vega.community
|
NX_TENDERMINT_URL=https://be.vega.community
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ NX_VEGA_GOVERNANCE_URL=https://governance.mainnet-mirror.vega.rocks
|
|||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=https://explorer.mainnet-mirror.vega.rocks/
|
NX_VEGA_EXPLORER_URL=https://explorer.mainnet-mirror.vega.rocks/
|
||||||
NX_VEGA_CONSOLE_URL=https://console.mainnet-mirror.vega.rocks
|
NX_VEGA_CONSOLE_URL=https://console.mainnet-mirror.vega.rocks
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
# .env is stagnet1, so there are no overrides required
|
# .env is stagnet1, so there are no overrides required
|
||||||
NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz","STAGNET1":"https://stagnet1.explorer.vega.xyz"}'
|
NX_VEGA_NETWORKS='{"TESTNET":"https://explorer.fairground.wtf","MAINNET":"https://explorer.vega.xyz","STAGNET1":"https://stagnet1.explorer.vega.xyz"}'
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ NX_VEGA_GOVERNANCE_URL=https://governance.fairground.wtf
|
|||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf
|
NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf
|
||||||
NX_VEGA_CONSOLE_URL=https://console.fairground.wtf
|
NX_VEGA_CONSOLE_URL=https://console.fairground.wtf
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ NX_BLOCK_EXPLORER=https://be.validators-testnet.vega.rocks/rest
|
|||||||
NX_VEGA_GOVERNANCE_URL=https://governance.validators-testnet.vega.rocks
|
NX_VEGA_GOVERNANCE_URL=https://governance.validators-testnet.vega.rocks
|
||||||
NX_VEGA_EXPLORER_URL=https://explorer.validators-testnet.vega.rocks/
|
NX_VEGA_EXPLORER_URL=https://explorer.validators-testnet.vega.rocks/
|
||||||
NX_VEGA_CONSOLE_URL=https://trading.validators-testnet.vega.rocks/
|
NX_VEGA_CONSOLE_URL=https://trading.validators-testnet.vega.rocks/
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.rocks
|
NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket
|
||||||
|
|||||||
@@ -6,4 +6,3 @@ NX_BLOCK_EXPLORER=
|
|||||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
||||||
NX_VEGA_EXPLORER_URL=/
|
NX_VEGA_EXPLORER_URL=/
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|||||||
@@ -13,12 +13,6 @@ query ExplorerMarket($id: ID!) {
|
|||||||
decimals
|
decimals
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
settlementAsset {
|
|
||||||
decimals
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-7
@@ -8,7 +8,7 @@ export type ExplorerMarketQueryVariables = Types.Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerMarketQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', decimals: number } } | { __typename?: 'Perpetual', quoteName: string, settlementAsset: { __typename?: 'Asset', decimals: number } } | { __typename?: 'Spot' } } } } | null };
|
export type ExplorerMarketQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', decimals: number } } } } } | null };
|
||||||
|
|
||||||
|
|
||||||
export const ExplorerMarketDocument = gql`
|
export const ExplorerMarketDocument = gql`
|
||||||
@@ -27,12 +27,6 @@ export const ExplorerMarketDocument = gql`
|
|||||||
decimals
|
decimals
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
settlementAsset {
|
|
||||||
decimals
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ describe('Market link component', () => {
|
|||||||
instrument: {
|
instrument: {
|
||||||
name: 'test-label',
|
name: 'test-label',
|
||||||
product: {
|
product: {
|
||||||
__typename: 'Future',
|
|
||||||
quoteName: 'dai',
|
quoteName: 'dai',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ import type { MarketInfoWithData } from '@vegaprotocol/markets';
|
|||||||
import {
|
import {
|
||||||
PriceMonitoringBoundsInfoPanel,
|
PriceMonitoringBoundsInfoPanel,
|
||||||
SuccessionLineInfoPanel,
|
SuccessionLineInfoPanel,
|
||||||
getDataSourceSpecForSettlementData,
|
|
||||||
getDataSourceSpecForTradingTermination,
|
|
||||||
} from '@vegaprotocol/markets';
|
} from '@vegaprotocol/markets';
|
||||||
import {
|
import {
|
||||||
LiquidityInfoPanel,
|
LiquidityInfoPanel,
|
||||||
LiquidityMonitoringParametersInfoPanel,
|
LiquidityMonitoringParametersInfoPanel,
|
||||||
InstrumentInfoPanel,
|
InstrumentInfoPanel,
|
||||||
KeyDetailsInfoPanel,
|
KeyDetailsInfoPanel,
|
||||||
|
LiquidityPriceRangeInfoPanel,
|
||||||
MetadataInfoPanel,
|
MetadataInfoPanel,
|
||||||
OracleInfoPanel,
|
OracleInfoPanel,
|
||||||
RiskFactorsInfoPanel,
|
RiskFactorsInfoPanel,
|
||||||
@@ -19,21 +18,20 @@ import {
|
|||||||
SettlementAssetInfoPanel,
|
SettlementAssetInfoPanel,
|
||||||
} from '@vegaprotocol/markets';
|
} from '@vegaprotocol/markets';
|
||||||
import { MarketInfoTable } from '@vegaprotocol/markets';
|
import { MarketInfoTable } from '@vegaprotocol/markets';
|
||||||
import type { DataSourceFragment } from '@vegaprotocol/markets';
|
import type { DataSourceDefinition } from '@vegaprotocol/types';
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
|
|
||||||
export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
||||||
if (!market) return null;
|
if (!market) return null;
|
||||||
const { product } = market.tradableInstrument.instrument;
|
|
||||||
const settlementDataSource = getDataSourceSpecForSettlementData(product);
|
|
||||||
const terminationDataSource = getDataSourceSpecForTradingTermination(product);
|
|
||||||
|
|
||||||
const getSigners = ({ data }: DataSourceFragment) => {
|
const settlementData = market.tradableInstrument.instrument.product
|
||||||
|
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||||
|
const terminationData = market.tradableInstrument.instrument.product
|
||||||
|
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||||
|
|
||||||
|
const getSigners = (data: DataSourceDefinition) => {
|
||||||
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||||
const signers =
|
const signers = data.sourceType.sourceType.signers || [];
|
||||||
('signers' in data.sourceType.sourceType &&
|
|
||||||
data.sourceType.sourceType.signers) ||
|
|
||||||
[];
|
|
||||||
|
|
||||||
return signers.map(({ signer }, i) => {
|
return signers.map(({ signer }, i) => {
|
||||||
return (
|
return (
|
||||||
@@ -45,13 +43,10 @@ export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
|||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
const showTwoOracles =
|
const showTwoOracles = isEqual(
|
||||||
settlementDataSource &&
|
getSigners(settlementData),
|
||||||
terminationDataSource &&
|
getSigners(terminationData)
|
||||||
isEqual(
|
);
|
||||||
getSigners(settlementDataSource),
|
|
||||||
getSigners(terminationDataSource)
|
|
||||||
);
|
|
||||||
|
|
||||||
const headerClassName = 'font-alpha calt text-xl mt-4 border-b-2 pb-2';
|
const headerClassName = 'font-alpha calt text-xl mt-4 border-b-2 pb-2';
|
||||||
|
|
||||||
@@ -96,6 +91,8 @@ export const MarketDetails = ({ market }: { market: MarketInfoWithData }) => {
|
|||||||
<LiquidityMonitoringParametersInfoPanel market={market} />
|
<LiquidityMonitoringParametersInfoPanel market={market} />
|
||||||
<h2 className={headerClassName}>{t('Liquidity')}</h2>
|
<h2 className={headerClassName}>{t('Liquidity')}</h2>
|
||||||
<LiquidityInfoPanel market={market} />
|
<LiquidityInfoPanel market={market} />
|
||||||
|
<h2 className={headerClassName}>{t('Liquidity price range')}</h2>
|
||||||
|
<LiquidityPriceRangeInfoPanel market={market} />
|
||||||
{showTwoOracles ? (
|
{showTwoOracles ? (
|
||||||
<>
|
<>
|
||||||
<h2 className={headerClassName}>{t('Settlement oracle')}</h2>
|
<h2 className={headerClassName}>{t('Settlement oracle')}</h2>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { getAsset, type MarketFieldsFragment } from '@vegaprotocol/markets';
|
import type { MarketFieldsFragment } from '@vegaprotocol/markets';
|
||||||
import { t } from '@vegaprotocol/i18n';
|
import { t } from '@vegaprotocol/i18n';
|
||||||
import { ButtonLink } from '@vegaprotocol/ui-toolkit';
|
import { ButtonLink } from '@vegaprotocol/ui-toolkit';
|
||||||
import type { AgGridReact } from 'ag-grid-react';
|
import type { AgGridReact } from 'ag-grid-react';
|
||||||
@@ -73,7 +73,8 @@ export const MarketsTable = ({ data }: MarketsTableProps) => {
|
|||||||
MarketFieldsFragment,
|
MarketFieldsFragment,
|
||||||
'tradableInstrument.instrument.product.settlementAsset.symbol'
|
'tradableInstrument.instrument.product.settlementAsset.symbol'
|
||||||
>) => {
|
>) => {
|
||||||
const value = data && getAsset(data);
|
const value =
|
||||||
|
data?.tradableInstrument.instrument.product.settlementAsset;
|
||||||
return value ? (
|
return value ? (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ fragment ExplorerDeterministicOrderFields on Order {
|
|||||||
... on Future {
|
... on Future {
|
||||||
quoteName
|
quoteName
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ExplorerDeterministicOrderFieldsFragment = { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } | { __typename?: 'Perpetual', quoteName: string } | { __typename?: 'Spot' } } } } };
|
export type ExplorerDeterministicOrderFieldsFragment = { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } };
|
||||||
|
|
||||||
export type ExplorerDeterministicOrderQueryVariables = Types.Exact<{
|
export type ExplorerDeterministicOrderQueryVariables = Types.Exact<{
|
||||||
orderId: Types.Scalars['ID'];
|
orderId: Types.Scalars['ID'];
|
||||||
@@ -11,7 +11,7 @@ export type ExplorerDeterministicOrderQueryVariables = Types.Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerDeterministicOrderQuery = { __typename?: 'Query', orderByID: { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } | { __typename?: 'Perpetual', quoteName: string } | { __typename?: 'Spot' } } } } } };
|
export type ExplorerDeterministicOrderQuery = { __typename?: 'Query', orderByID: { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } } };
|
||||||
|
|
||||||
export const ExplorerDeterministicOrderFieldsFragmentDoc = gql`
|
export const ExplorerDeterministicOrderFieldsFragmentDoc = gql`
|
||||||
fragment ExplorerDeterministicOrderFields on Order {
|
fragment ExplorerDeterministicOrderFields on Order {
|
||||||
@@ -47,9 +47,6 @@ export const ExplorerDeterministicOrderFieldsFragmentDoc = gql`
|
|||||||
... on Future {
|
... on Future {
|
||||||
quoteName
|
quoteName
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ function renderExistingAmend(
|
|||||||
instrument: {
|
instrument: {
|
||||||
name: 'test-label',
|
name: 'test-label',
|
||||||
product: {
|
product: {
|
||||||
__typename: 'Future',
|
|
||||||
quoteName: 'dai',
|
quoteName: 'dai',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ const PriceInMarket = ({
|
|||||||
label = addDecimalsFormatNumber(price, data.market.decimalPlaces);
|
label = addDecimalsFormatNumber(price, data.market.decimalPlaces);
|
||||||
} else if (
|
} else if (
|
||||||
decimalSource === 'SETTLEMENT_ASSET' &&
|
decimalSource === 'SETTLEMENT_ASSET' &&
|
||||||
data.market &&
|
|
||||||
'settlementAsset' in data.market.tradableInstrument.instrument.product &&
|
|
||||||
data.market?.tradableInstrument.instrument.product.settlementAsset
|
data.market?.tradableInstrument.instrument.product.settlementAsset
|
||||||
) {
|
) {
|
||||||
label = addDecimalsFormatNumber(
|
label = addDecimalsFormatNumber(
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const ProposalsTable = ({ data }: ProposalsTableProps) => {
|
|||||||
const { params } = useNetworkParams([
|
const { params } = useNetworkParams([
|
||||||
NetworkParams.governance_proposal_market_requiredMajority,
|
NetworkParams.governance_proposal_market_requiredMajority,
|
||||||
]);
|
]);
|
||||||
const tokenLink = useLinks(DApp.Governance);
|
const tokenLink = useLinks(DApp.Token);
|
||||||
const requiredMajorityPercentage = useMemo(() => {
|
const requiredMajorityPercentage = useMemo(() => {
|
||||||
const requiredMajority =
|
const requiredMajority =
|
||||||
params?.governance_proposal_market_requiredMajority ?? 1;
|
params?.governance_proposal_market_requiredMajority ?? 1;
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ export const BundleSigners = ({
|
|||||||
tx,
|
tx,
|
||||||
id,
|
id,
|
||||||
}: BundleSignersProps) => {
|
}: BundleSignersProps) => {
|
||||||
const tokenLink = useLinks(DApp.Governance);
|
const tokenLink = useLinks(DApp.Token);
|
||||||
|
|
||||||
const bridgeFunction: BridgeFunction =
|
const bridgeFunction: BridgeFunction =
|
||||||
tx?.changes?.erc20 && 'contractAddress' in tx.changes.erc20
|
tx?.changes?.erc20 && 'contractAddress' in tx.changes.erc20
|
||||||
|
|||||||
@@ -11,14 +11,6 @@ fragment ExplorerOracleForMarketsMarket on Market {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
dataSourceSpecForSettlementData {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
dataSourceSpecForSettlementSchedule {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,19 @@ import * as Apollo from '@apollo/client';
|
|||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ExplorerOracleDataConnectionFragment = { __typename?: 'OracleSpec', dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
export type ExplorerOracleDataConnectionFragment = { __typename?: 'OracleSpec', dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
||||||
|
|
||||||
export type ExplorerOracleDataSourceFragment = { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } | { __typename?: 'EthCallSpec' } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } | { __typename?: 'DataSourceSpecConfigurationTimeTrigger' } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
export type ExplorerOracleDataSourceFragment = { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
||||||
|
|
||||||
export type ExplorerOracleSpecsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
export type ExplorerOracleSpecsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerOracleSpecsQuery = { __typename?: 'Query', oracleSpecsConnection?: { __typename?: 'OracleSpecsConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleSpecEdge', node: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } | { __typename?: 'EthCallSpec' } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } | { __typename?: 'DataSourceSpecConfigurationTimeTrigger' } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } } | null> | null } | null };
|
export type ExplorerOracleSpecsQuery = { __typename?: 'Query', oracleSpecsConnection?: { __typename?: 'OracleSpecsConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleSpecEdge', node: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } } | null> | null } | null };
|
||||||
|
|
||||||
export type ExplorerOracleSpecByIdQueryVariables = Types.Exact<{
|
export type ExplorerOracleSpecByIdQueryVariables = Types.Exact<{
|
||||||
id: Types.Scalars['ID'];
|
id: Types.Scalars['ID'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerOracleSpecByIdQuery = { __typename?: 'Query', oracleSpec?: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } | { __typename?: 'EthCallSpec' } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } | { __typename?: 'DataSourceSpecConfigurationTimeTrigger' } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
export type ExplorerOracleSpecByIdQuery = { __typename?: 'Query', oracleSpec?: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
||||||
|
|
||||||
export const ExplorerOracleDataConnectionFragmentDoc = gql`
|
export const ExplorerOracleDataConnectionFragmentDoc = gql`
|
||||||
fragment ExplorerOracleDataConnection on OracleSpec {
|
fragment ExplorerOracleDataConnection on OracleSpec {
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ExplorerOracleForMarketsMarketFragment = { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } | { __typename?: 'Perpetual', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForSettlementSchedule: { __typename?: 'DataSourceSpec', id: string } } | { __typename?: 'Spot' } } } };
|
export type ExplorerOracleForMarketsMarketFragment = { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } } } };
|
||||||
|
|
||||||
export type ExplorerOracleFormMarketsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
export type ExplorerOracleFormMarketsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerOracleFormMarketsQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } | { __typename?: 'Perpetual', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForSettlementSchedule: { __typename?: 'DataSourceSpec', id: string } } | { __typename?: 'Spot' } } } } }> } | null };
|
export type ExplorerOracleFormMarketsQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } } } } }> } | null };
|
||||||
|
|
||||||
export const ExplorerOracleForMarketsMarketFragmentDoc = gql`
|
export const ExplorerOracleForMarketsMarketFragmentDoc = gql`
|
||||||
fragment ExplorerOracleForMarketsMarket on Market {
|
fragment ExplorerOracleForMarketsMarket on Market {
|
||||||
@@ -24,14 +24,6 @@ export const ExplorerOracleForMarketsMarketFragmentDoc = gql`
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
dataSourceSpecForSettlementData {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
dataSourceSpecForSettlementSchedule {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ interface OracleMarketsProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Slightly misleading names, OracleMarkets lists the market (almost always singular)
|
* Slightly misleadlingly names, OracleMarkets lists the market (almost always singular)
|
||||||
* to which an oracle is attached. It also checks what it triggers, by checking on the
|
* to which an oracle is attached. It also checks what it triggers, by checking on the
|
||||||
* market whether it is attached to the dataSourceSpecForSettlementData or ..TradingTermination
|
* market whether it is attached to the dataSourceSpecForSettlementData or ..TradingTermination
|
||||||
*/
|
*/
|
||||||
@@ -27,10 +27,8 @@ export function OracleMarkets({ id }: OracleMarketsProps) {
|
|||||||
const m = markets.find((m) => {
|
const m = markets.find((m) => {
|
||||||
const p = m.tradableInstrument.instrument.product;
|
const p = m.tradableInstrument.instrument.product;
|
||||||
if (
|
if (
|
||||||
((p.__typename === 'Future' || p.__typename === 'Perpetual') &&
|
p?.dataSourceSpecForSettlementData?.id === id ||
|
||||||
p.dataSourceSpecForSettlementData.id === id) ||
|
p?.dataSourceSpecForTradingTermination?.id === id
|
||||||
('dataSourceSpecForTradingTermination' in p &&
|
|
||||||
p.dataSourceSpecForTradingTermination.id === id)
|
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -63,32 +61,8 @@ export function getLabel(
|
|||||||
m: ExplorerOracleForMarketsMarketFragment | null
|
m: ExplorerOracleForMarketsMarketFragment | null
|
||||||
): string {
|
): string {
|
||||||
const settlementId =
|
const settlementId =
|
||||||
((m?.tradableInstrument?.instrument?.product?.__typename === 'Future' ||
|
m?.tradableInstrument?.instrument?.product?.dataSourceSpecForSettlementData
|
||||||
m?.tradableInstrument?.instrument?.product?.__typename === 'Perpetual') &&
|
?.id || null;
|
||||||
m?.tradableInstrument?.instrument?.product
|
|
||||||
?.dataSourceSpecForSettlementData?.id) ||
|
|
||||||
null;
|
|
||||||
|
|
||||||
const terminationId =
|
return id === settlementId ? 'Settlement for' : 'Termination for';
|
||||||
(m?.tradableInstrument?.instrument?.product?.__typename === 'Future' &&
|
|
||||||
m?.tradableInstrument?.instrument?.product
|
|
||||||
?.dataSourceSpecForTradingTermination?.id) ||
|
|
||||||
null;
|
|
||||||
|
|
||||||
const settlementScheduleId =
|
|
||||||
(m?.tradableInstrument?.instrument?.product?.__typename === 'Perpetual' &&
|
|
||||||
m?.tradableInstrument?.instrument?.product
|
|
||||||
?.dataSourceSpecForSettlementSchedule?.id) ||
|
|
||||||
null;
|
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
case settlementId:
|
|
||||||
return 'Settlement for';
|
|
||||||
case terminationId:
|
|
||||||
return 'Termination for';
|
|
||||||
case settlementScheduleId:
|
|
||||||
return 'Settlement schedule for';
|
|
||||||
default:
|
|
||||||
return 'Unknown';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,9 +67,6 @@ export function OracleSigners({ sourceType }: OracleDetailsSignersProps) {
|
|||||||
if (sourceType.__typename !== 'DataSourceDefinitionExternal') {
|
if (sourceType.__typename !== 'DataSourceDefinitionExternal') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!('signers' in sourceType.sourceType)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const signers = sourceType.sourceType.signers;
|
const signers = sourceType.sourceType.signers;
|
||||||
|
|
||||||
if (!signers || signers.length === 0) {
|
if (!signers || signers.length === 0) {
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ fragment ExplorerPartyAssetsAccounts on AccountBalance {
|
|||||||
... on Future {
|
... on Future {
|
||||||
quoteName
|
quoteName
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ExplorerPartyAssetsAccountsFragment = { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } | { __typename?: 'Perpetual', quoteName: string } | { __typename?: 'Spot' } } } } | null };
|
export type ExplorerPartyAssetsAccountsFragment = { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } | null };
|
||||||
|
|
||||||
export type ExplorerPartyAssetsQueryVariables = Types.Exact<{
|
export type ExplorerPartyAssetsQueryVariables = Types.Exact<{
|
||||||
partyId: Types.Scalars['ID'];
|
partyId: Types.Scalars['ID'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerPartyAssetsQuery = { __typename?: 'Query', partiesConnection?: { __typename?: 'PartyConnection', edges: Array<{ __typename?: 'PartyEdge', node: { __typename?: 'Party', id: string, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string, linkings: { __typename?: 'StakesConnection', edges?: Array<{ __typename?: 'StakeLinkingEdge', node: { __typename?: 'StakeLinking', type: Types.StakeLinkingType, status: Types.StakeLinkingStatus, amount: string } } | null> | null } }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } | { __typename?: 'Perpetual', quoteName: string } | { __typename?: 'Spot' } } } } | null } } | null> | null } | null } }> } | null };
|
export type ExplorerPartyAssetsQuery = { __typename?: 'Query', partiesConnection?: { __typename?: 'PartyConnection', edges: Array<{ __typename?: 'PartyEdge', node: { __typename?: 'Party', id: string, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string, linkings: { __typename?: 'StakesConnection', edges?: Array<{ __typename?: 'StakeLinkingEdge', node: { __typename?: 'StakeLinking', type: Types.StakeLinkingType, status: Types.StakeLinkingStatus, amount: string } } | null> | null } }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } | null } } | null> | null } | null } }> } | null };
|
||||||
|
|
||||||
export const ExplorerPartyAssetsAccountsFragmentDoc = gql`
|
export const ExplorerPartyAssetsAccountsFragmentDoc = gql`
|
||||||
fragment ExplorerPartyAssetsAccounts on AccountBalance {
|
fragment ExplorerPartyAssetsAccounts on AccountBalance {
|
||||||
@@ -38,9 +38,6 @@ export const ExplorerPartyAssetsAccountsFragmentDoc = gql`
|
|||||||
... on Future {
|
... on Future {
|
||||||
quoteName
|
quoteName
|
||||||
}
|
}
|
||||||
... on Perpetual {
|
|
||||||
quoteName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export const ValidatorsPage = () => {
|
|||||||
const [vegaDialog, setVegaDialog] = useState<boolean>(false);
|
const [vegaDialog, setVegaDialog] = useState<boolean>(false);
|
||||||
const [tmDialog, setTmDialog] = useState<boolean>(false);
|
const [tmDialog, setTmDialog] = useState<boolean>(false);
|
||||||
|
|
||||||
const tokenLink = useLinks(DApp.Governance);
|
const tokenLink = useLinks(DApp.Token);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
+10
@@ -1453,6 +1453,11 @@ export interface components {
|
|||||||
readonly liquidityMonitoringParameters?: components['schemas']['vegaLiquidityMonitoringParameters'];
|
readonly liquidityMonitoringParameters?: components['schemas']['vegaLiquidityMonitoringParameters'];
|
||||||
/** @description Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
|
/** @description Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
|
||||||
readonly logNormal?: components['schemas']['vegaLogNormalRiskModel'];
|
readonly logNormal?: components['schemas']['vegaLogNormalRiskModel'];
|
||||||
|
/**
|
||||||
|
* @description Percentage move up and down from the mid price which specifies the range of
|
||||||
|
* price levels over which automated liquidity provision orders will be deployed.
|
||||||
|
*/
|
||||||
|
readonly lpPriceRange?: string;
|
||||||
/** @description Optional new futures market metadata, tags. */
|
/** @description Optional new futures market metadata, tags. */
|
||||||
readonly metadata?: readonly string[];
|
readonly metadata?: readonly string[];
|
||||||
/**
|
/**
|
||||||
@@ -1848,6 +1853,11 @@ export interface components {
|
|||||||
readonly liquidityMonitoringParameters?: components['schemas']['vegaLiquidityMonitoringParameters'];
|
readonly liquidityMonitoringParameters?: components['schemas']['vegaLiquidityMonitoringParameters'];
|
||||||
/** @description Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
|
/** @description Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. */
|
||||||
readonly logNormal?: components['schemas']['vegaLogNormalRiskModel'];
|
readonly logNormal?: components['schemas']['vegaLogNormalRiskModel'];
|
||||||
|
/**
|
||||||
|
* @description Percentage move up and down from the mid price which specifies the range of
|
||||||
|
* price levels over which automated liquidity provision orders will be deployed.
|
||||||
|
*/
|
||||||
|
readonly lpPriceRange?: string;
|
||||||
/** @description Optional futures market metadata, tags. */
|
/** @description Optional futures market metadata, tags. */
|
||||||
readonly metadata?: readonly string[];
|
readonly metadata?: readonly string[];
|
||||||
/** @description Price monitoring parameters. */
|
/** @description Price monitoring parameters. */
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ NX_ETH_LOCAL_PROVIDER_URL=http://localhost:8545/
|
|||||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet
|
NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet
|
||||||
NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz
|
NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/test/announcements.json
|
||||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||||
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
||||||
|
|||||||
@@ -3,4 +3,3 @@ NX_VEGA_ENV=DEVNET
|
|||||||
NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql
|
NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql
|
||||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|||||||
@@ -3,4 +3,3 @@ NX_VEGA_ENV=MAINNET
|
|||||||
NX_VEGA_URL=https://api.vega.community/graphql
|
NX_VEGA_URL=https://api.vega.community/graphql
|
||||||
NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||||
NX_ETHERSCAN_URL=https://etherscan.io
|
NX_ETHERSCAN_URL=https://etherscan.io
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|||||||
@@ -3,4 +3,3 @@ NX_VEGA_ENV=TESTNET
|
|||||||
NX_VEGA_URL=https://api.n07.testnet.vega.xyz/graphql
|
NX_VEGA_URL=https://api.n07.testnet.vega.xyz/graphql
|
||||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|||||||
@@ -19,22 +19,7 @@ export const upgradeProposalsData = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
node: {
|
node: {
|
||||||
upgradeBlockHeight: '10001',
|
upgradeBlockHeight: '1955065',
|
||||||
vegaReleaseTag: 'v0.71.0+dev-12156-bca1d57e',
|
|
||||||
approvers: [
|
|
||||||
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
|
||||||
'121934387281812a2d5e6913e5d57c0f85a8f169e2752347ee2e23b52d46623c',
|
|
||||||
'65c80e2f5f84e2109eec30810f137ba04cbbecaba8f27706c146cc6c6f90db29',
|
|
||||||
'bd6339d2428c79ac3bc9011771236d17bac92bcb1806423388d52fb440043aef',
|
|
||||||
],
|
|
||||||
status: 'PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED',
|
|
||||||
__typename: 'ProtocolUpgradeProposal',
|
|
||||||
},
|
|
||||||
__typename: 'ProtocolUpgradeProposalEdge',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
node: {
|
|
||||||
upgradeBlockHeight: '20',
|
|
||||||
vegaReleaseTag: 'v0.71.0+dev-12156-bca1d57e',
|
vegaReleaseTag: 'v0.71.0+dev-12156-bca1d57e',
|
||||||
approvers: [
|
approvers: [
|
||||||
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"positionDecimalPlaces": "5",
|
"positionDecimalPlaces": "5",
|
||||||
"linearSlippageFactor": "0.001",
|
"linearSlippageFactor": "0.001",
|
||||||
"quadraticSlippageFactor": "0",
|
"quadraticSlippageFactor": "0",
|
||||||
|
"lpPriceRange": "10",
|
||||||
"instrument": {
|
"instrument": {
|
||||||
"name": "Token test market",
|
"name": "Token test market",
|
||||||
"code": "TEST.24h",
|
"code": "TEST.24h",
|
||||||
@@ -103,12 +104,6 @@
|
|||||||
"r": 0.016,
|
"r": 0.016,
|
||||||
"sigma": 0.5
|
"sigma": 0.5
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"liquiditySlaParameters": {
|
|
||||||
"priceRange": "0.95",
|
|
||||||
"commitmentMinTimeFraction": "0.5",
|
|
||||||
"performanceHysteresisEpochs": 2,
|
|
||||||
"slaCompetitionFactor": "0.75"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"positionDecimalPlaces": "5",
|
"positionDecimalPlaces": "5",
|
||||||
"linearSlippageFactor": "0.001",
|
"linearSlippageFactor": "0.001",
|
||||||
"quadraticSlippageFactor": "0",
|
"quadraticSlippageFactor": "0",
|
||||||
|
"lpPriceRange": "10",
|
||||||
"instrument": {
|
"instrument": {
|
||||||
"name": "Token test market",
|
"name": "Token test market",
|
||||||
"code": "Token.24h",
|
"code": "Token.24h",
|
||||||
@@ -97,12 +98,6 @@
|
|||||||
"r": 0.016,
|
"r": 0.016,
|
||||||
"sigma": 0.8
|
"sigma": 0.8
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"liquiditySlaParameters": {
|
|
||||||
"priceRange": "0.95",
|
|
||||||
"commitmentMinTimeFraction": "0.5",
|
|
||||||
"performanceHysteresisEpochs": 2,
|
|
||||||
"slaCompetitionFactor": "0.75"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"positionDecimalPlaces": "5",
|
"positionDecimalPlaces": "5",
|
||||||
"linearSlippageFactor": "0.001",
|
"linearSlippageFactor": "0.001",
|
||||||
"quadraticSlippageFactor": "0",
|
"quadraticSlippageFactor": "0",
|
||||||
|
"lpPriceRange": "10",
|
||||||
"instrument": {
|
"instrument": {
|
||||||
"name": "Token test market",
|
"name": "Token test market",
|
||||||
"code": "Token.24h",
|
"code": "Token.24h",
|
||||||
@@ -98,12 +99,6 @@
|
|||||||
"sigma": 0.8
|
"sigma": 0.8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"liquiditySlaParameters": {
|
|
||||||
"priceRange": "0.95",
|
|
||||||
"commitmentMinTimeFraction": "0.5",
|
|
||||||
"performanceHysteresisEpochs": 2,
|
|
||||||
"slaCompetitionFactor": "0.75"
|
|
||||||
},
|
|
||||||
"successor": {
|
"successor": {
|
||||||
"parentMarketId": "",
|
"parentMarketId": "",
|
||||||
"insurancePoolFraction": "0.75"
|
"insurancePoolFraction": "0.75"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"lpPriceRange": "11",
|
||||||
"instrument": {
|
"instrument": {
|
||||||
"code": "Token.24h",
|
"code": "Token.24h",
|
||||||
"future": {
|
"future": {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"lpPriceRange": "10",
|
||||||
"linearSlippageFactor": "0.001",
|
"linearSlippageFactor": "0.001",
|
||||||
"quadraticSlippageFactor": "0",
|
"quadraticSlippageFactor": "0",
|
||||||
"instrument": {
|
"instrument": {
|
||||||
@@ -97,11 +98,5 @@
|
|||||||
"r": 0.016,
|
"r": 0.016,
|
||||||
"sigma": 0.3
|
"sigma": 0.3
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"liquiditySlaParameters": {
|
|
||||||
"priceRange": "0.95",
|
|
||||||
"commitmentMinTimeFraction": "0.5",
|
|
||||||
"performanceHysteresisEpochs": 2,
|
|
||||||
"slaCompetitionFactor": "0.75"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ const proposalType = 'proposal-type';
|
|||||||
const proposalDetails = 'proposal-details';
|
const proposalDetails = 'proposal-details';
|
||||||
const newProposalSubmitButton = 'proposal-submit';
|
const newProposalSubmitButton = 'proposal-submit';
|
||||||
const proposalVoteDeadline = 'proposal-vote-deadline';
|
const proposalVoteDeadline = 'proposal-vote-deadline';
|
||||||
const proposalEnactmentDeadline = 'proposal-enactment-deadline';
|
|
||||||
const proposalParameterSelect = 'proposal-parameter-select';
|
const proposalParameterSelect = 'proposal-parameter-select';
|
||||||
const proposalMarketSelect = 'proposal-market-select';
|
const proposalMarketSelect = 'proposal-market-select';
|
||||||
const newProposalTitle = 'proposal-title';
|
const newProposalTitle = 'proposal-title';
|
||||||
@@ -228,8 +227,6 @@ context(
|
|||||||
parseSpecialCharSequences: false,
|
parseSpecialCharSequences: false,
|
||||||
delay: 2,
|
delay: 2,
|
||||||
});
|
});
|
||||||
cy.getByTestId(proposalVoteDeadline).clear().type('2');
|
|
||||||
cy.getByTestId(proposalEnactmentDeadline).clear().type('3');
|
|
||||||
});
|
});
|
||||||
cy.getByTestId(proposalDownloadBtn)
|
cy.getByTestId(proposalDownloadBtn)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
@@ -637,8 +634,6 @@ context(
|
|||||||
parseSpecialCharSequences: false,
|
parseSpecialCharSequences: false,
|
||||||
delay: 2,
|
delay: 2,
|
||||||
});
|
});
|
||||||
cy.getByTestId(proposalVoteDeadline).clear().type('2');
|
|
||||||
cy.getByTestId(proposalEnactmentDeadline).clear().type('3');
|
|
||||||
});
|
});
|
||||||
cy.getByTestId(proposalDownloadBtn)
|
cy.getByTestId(proposalDownloadBtn)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ context(
|
|||||||
closeStakingDialog();
|
closeStakingDialog();
|
||||||
navigateTo(navigation.validators);
|
navigateTo(navigation.validators);
|
||||||
cy.get(`[row-id="${0}"]`)
|
cy.get(`[row-id="${0}"]`)
|
||||||
.first()
|
.eq(1)
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.getByTestId(stakeValidatorListTotalStake)
|
cy.getByTestId(stakeValidatorListTotalStake)
|
||||||
.should('have.text', '3,002.00')
|
.should('have.text', '3,002.00')
|
||||||
@@ -222,7 +222,7 @@ context(
|
|||||||
.and('be.visible');
|
.and('be.visible');
|
||||||
});
|
});
|
||||||
cy.get(`[row-id="${1}"]`)
|
cy.get(`[row-id="${1}"]`)
|
||||||
.first()
|
.eq(1)
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.getByTestId(stakeValidatorListTotalStake)
|
cy.getByTestId(stakeValidatorListTotalStake)
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
@@ -262,10 +262,10 @@ context(
|
|||||||
'2'
|
'2'
|
||||||
);
|
);
|
||||||
waitForBeginningOfEpoch();
|
waitForBeginningOfEpoch();
|
||||||
cy.getByTestId(
|
cy.getByTestId(stakeValidatorListStakePercentage).should(
|
||||||
stakeValidatorListStakePercentage,
|
'have.text',
|
||||||
epochTimeout
|
'50.02%'
|
||||||
).should('have.text', '50.02%');
|
);
|
||||||
navigateTo(navigation.validators);
|
navigateTo(navigation.validators);
|
||||||
validateValidatorListTotalStakeAndShare('0', '3,002.00', '50.02%');
|
validateValidatorListTotalStakeAndShare('0', '3,002.00', '50.02%');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ const proposalDocumentationLink = 'proposal-documentation-link';
|
|||||||
const connectToVegaWalletButton = 'connect-to-vega-wallet-btn';
|
const connectToVegaWalletButton = 'connect-to-vega-wallet-btn';
|
||||||
const governanceDocsUrl = 'https://vega.xyz/governance';
|
const governanceDocsUrl = 'https://vega.xyz/governance';
|
||||||
const networkUpgradeProposalListItem = 'protocol-upgrade-proposals-list-item';
|
const networkUpgradeProposalListItem = 'protocol-upgrade-proposals-list-item';
|
||||||
const proposalUpgradeBlockHeight = 'protocol-upgrade-proposal-block-height';
|
|
||||||
const closedProposals = 'closed-proposals';
|
const closedProposals = 'closed-proposals';
|
||||||
const closedProposalToggle = 'closed-proposals-toggle-networkUpgrades';
|
const closedProposalToggle = 'closed-proposals-toggle-networkUpgrades';
|
||||||
const protocolUpgradeTime = 'protocol-upgrade-time';
|
const protocolUpgradeTime = 'protocol-upgrade-time';
|
||||||
@@ -185,7 +184,7 @@ context(
|
|||||||
'have.text',
|
'have.text',
|
||||||
'Vega release tag: v1'
|
'Vega release tag: v1'
|
||||||
);
|
);
|
||||||
cy.getByTestId(proposalUpgradeBlockHeight).should(
|
cy.getByTestId('protocol-upgrade-proposal-block-height').should(
|
||||||
'have.text',
|
'have.text',
|
||||||
'Upgrade block height: 2015942'
|
'Upgrade block height: 2015942'
|
||||||
);
|
);
|
||||||
@@ -200,15 +199,7 @@ context(
|
|||||||
});
|
});
|
||||||
cy.getByTestId(closedProposalToggle).click();
|
cy.getByTestId(closedProposalToggle).click();
|
||||||
cy.getByTestId(closedProposals).within(() => {
|
cy.getByTestId(closedProposals).within(() => {
|
||||||
cy.getByTestId(networkUpgradeProposalListItem).should('have.length', 2);
|
cy.getByTestId(networkUpgradeProposalListItem).should('have.length', 1);
|
||||||
cy.getByTestId(networkUpgradeProposalListItem)
|
|
||||||
.first()
|
|
||||||
.within(() => {
|
|
||||||
cy.getByTestId(proposalUpgradeBlockHeight).should(
|
|
||||||
'contain.text',
|
|
||||||
'10001'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -105,13 +105,8 @@ export function createNewMarketProposalTxBody(): ProposalSubmissionBody {
|
|||||||
decimalPlaces: '5',
|
decimalPlaces: '5',
|
||||||
positionDecimalPlaces: '5',
|
positionDecimalPlaces: '5',
|
||||||
linearSlippageFactor: '0.001',
|
linearSlippageFactor: '0.001',
|
||||||
liquiditySlaParameters: {
|
|
||||||
priceRange: '0.5',
|
|
||||||
commitmentMinTimeFraction: '0.1',
|
|
||||||
performanceHysteresisEpochs: 2,
|
|
||||||
slaCompetitionFactor: '0.1',
|
|
||||||
},
|
|
||||||
quadraticSlippageFactor: '0',
|
quadraticSlippageFactor: '0',
|
||||||
|
lpPriceRange: '10',
|
||||||
instrument: {
|
instrument: {
|
||||||
name: 'Token test market',
|
name: 'Token test market',
|
||||||
code: 'TEST.24h',
|
code: 'TEST.24h',
|
||||||
@@ -240,12 +235,7 @@ export function createSuccessorMarketProposalTxBody(
|
|||||||
positionDecimalPlaces: '5',
|
positionDecimalPlaces: '5',
|
||||||
linearSlippageFactor: '0.001',
|
linearSlippageFactor: '0.001',
|
||||||
quadraticSlippageFactor: '0',
|
quadraticSlippageFactor: '0',
|
||||||
liquiditySlaParameters: {
|
lpPriceRange: '10',
|
||||||
priceRange: '0.5',
|
|
||||||
commitmentMinTimeFraction: '0.1',
|
|
||||||
performanceHysteresisEpochs: 2,
|
|
||||||
slaCompetitionFactor: '0.1',
|
|
||||||
},
|
|
||||||
instrument: {
|
instrument: {
|
||||||
name: 'Token test market',
|
name: 'Token test market',
|
||||||
code: 'TEST.24h',
|
code: 'TEST.24h',
|
||||||
|
|||||||
@@ -170,20 +170,21 @@ export function clickOnValidatorFromList(
|
|||||||
validatorName = null
|
validatorName = null
|
||||||
) {
|
) {
|
||||||
cy.contains('Loading...', epochTimeout).should('not.exist');
|
cy.contains('Loading...', epochTimeout).should('not.exist');
|
||||||
|
waitForBeginningOfEpoch();
|
||||||
// below is to ensure validator list is shown
|
// below is to ensure validator list is shown
|
||||||
cy.get(stakeValidatorListName, { timeout: 10000 }).should('exist');
|
cy.get(stakeValidatorListName, { timeout: 10000 }).should('exist');
|
||||||
cy.get(stakeValidatorListPendingStake, txTimeout).should(
|
cy.get(stakeValidatorListPendingStake, txTimeout).should(
|
||||||
'not.contain',
|
'not.contain',
|
||||||
'2,000,000,000,000,000,000.00' // number due to bug #936
|
'2,000,000,000,000,000,000.00' // number due to bug #936
|
||||||
);
|
);
|
||||||
waitForBeginningOfEpoch();
|
|
||||||
if (validatorName) {
|
if (validatorName) {
|
||||||
cy.contains(validatorName).click();
|
cy.contains(validatorName).click();
|
||||||
} else {
|
} else {
|
||||||
cy.get(`[row-id="${validatorNumber}"]`)
|
cy.get(`[row-id="${validatorNumber}"]`)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.first()
|
.first()
|
||||||
.click();
|
.as('validatorOnList');
|
||||||
|
cy.get('@validatorOnList').click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +196,7 @@ export function validateValidatorListTotalStakeAndShare(
|
|||||||
cy.contains('Loading...', epochTimeout).should('not.exist');
|
cy.contains('Loading...', epochTimeout).should('not.exist');
|
||||||
waitForBeginningOfEpoch();
|
waitForBeginningOfEpoch();
|
||||||
cy.get(`[row-id="${positionOnList}"]`)
|
cy.get(`[row-id="${positionOnList}"]`)
|
||||||
.first()
|
.eq(1)
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.getByTestId(stakeValidatorListTotalStake, epochTimeout).should(
|
cy.getByTestId(stakeValidatorListTotalStake, epochTimeout).should(
|
||||||
'have.text',
|
'have.text',
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ NX_VEGA_REST_URL=http://localhost:3008/api/v2/
|
|||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
|
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=http://localhost:26617
|
NX_TENDERMINT_URL=http://localhost:26617
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fa
|
|||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/annou
|
|||||||
NX_VEGA_REST_URL=https://api.vega.community/api/v2/
|
NX_VEGA_REST_URL=https://api.vega.community/api/v2/
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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-mainnet
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-mainnet
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.vega.community
|
NX_TENDERMINT_URL=https://be.vega.community
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/annou
|
|||||||
NX_VEGA_REST_URL=https://api.mainnet-mirror.vega.rocks/api/v2/
|
NX_VEGA_REST_URL=https://api.mainnet-mirror.vega.rocks/api/v2/
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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-mainnet
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-mainnet
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ NX_DELEGATIONS_PAGINATION=50
|
|||||||
NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz
|
NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||||
NX_VEGA_REST_URL=https://api.n00.stagnet1.vega.xyz/api/v2/
|
NX_VEGA_REST_URL=https://api.n00.stagnet1.vega.xyz/api/v2/
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ NX_TRANCHES_SERVICE_URL=https://tranches-testnet-k8s.ops.vega.xyz
|
|||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||||
NX_VEGA_REST_URL=https://api.n07.testnet.vega.xyz/api/v2/
|
NX_VEGA_REST_URL=https://api.n07.testnet.vega.xyz/api/v2/
|
||||||
NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40@o286262.ingest.sentry.io/5882996
|
NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40@o286262.ingest.sentry.io/5882996
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ NX_VEGA_EXPLORER_URL=https://explorer.validators-testnet.vega.rocks/
|
|||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||||
NX_VEGA_REST_URL=https://api-validators-testnet.vega.rocks/api/v2/
|
NX_VEGA_REST_URL=https://api-validators-testnet.vega.rocks/api/v2/
|
||||||
NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40@o286262.ingest.sentry.io/5882996
|
NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40@o286262.ingest.sentry.io/5882996
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const HomeProposals = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="mb-16 break-all" data-testid="home-proposals">
|
<section className="mb-16" data-testid="home-proposals">
|
||||||
<Heading title={t('vegaGovernance')} />
|
<Heading title={t('vegaGovernance')} />
|
||||||
<h3 className="mb-6">{t('homeProposalsIntro')}</h3>
|
<h3 className="mb-6">{t('homeProposalsIntro')}</h3>
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
|
|||||||
+48
-66
@@ -5,6 +5,7 @@ import {
|
|||||||
InstrumentInfoPanel,
|
InstrumentInfoPanel,
|
||||||
KeyDetailsInfoPanel,
|
KeyDetailsInfoPanel,
|
||||||
LiquidityMonitoringParametersInfoPanel,
|
LiquidityMonitoringParametersInfoPanel,
|
||||||
|
LiquidityPriceRangeInfoPanel,
|
||||||
MetadataInfoPanel,
|
MetadataInfoPanel,
|
||||||
OracleInfoPanel,
|
OracleInfoPanel,
|
||||||
PriceMonitoringBoundsInfoPanel,
|
PriceMonitoringBoundsInfoPanel,
|
||||||
@@ -12,10 +13,6 @@ import {
|
|||||||
RiskModelInfoPanel,
|
RiskModelInfoPanel,
|
||||||
RiskParametersInfoPanel,
|
RiskParametersInfoPanel,
|
||||||
SettlementAssetInfoPanel,
|
SettlementAssetInfoPanel,
|
||||||
getDataSourceSpecForSettlementSchedule,
|
|
||||||
getDataSourceSpecForSettlementData,
|
|
||||||
getDataSourceSpecForTradingTermination,
|
|
||||||
getSigners,
|
|
||||||
} from '@vegaprotocol/markets';
|
} from '@vegaprotocol/markets';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -27,6 +24,7 @@ import {
|
|||||||
import { SubHeading } from '../../../../components/heading';
|
import { SubHeading } from '../../../../components/heading';
|
||||||
import { CollapsibleToggle } from '../../../../components/collapsible-toggle';
|
import { CollapsibleToggle } from '../../../../components/collapsible-toggle';
|
||||||
import type { MarketInfo } from '@vegaprotocol/markets';
|
import type { MarketInfo } from '@vegaprotocol/markets';
|
||||||
|
import type { DataSourceDefinition } from '@vegaprotocol/types';
|
||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
|
|
||||||
type MarketDataDialogState = {
|
type MarketDataDialogState = {
|
||||||
@@ -61,31 +59,20 @@ export const ProposalMarketData = ({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { product } = marketData.tradableInstrument.instrument;
|
const settlementData = marketData.tradableInstrument.instrument.product
|
||||||
|
.dataSourceSpecForSettlementData.data as DataSourceDefinition;
|
||||||
const settlementData = getDataSourceSpecForSettlementData(product);
|
|
||||||
const settlementScheduleData =
|
|
||||||
getDataSourceSpecForSettlementSchedule(product);
|
|
||||||
const terminationData = getDataSourceSpecForTradingTermination(product);
|
|
||||||
|
|
||||||
const parentProduct = parentMarketData?.tradableInstrument.instrument.product;
|
|
||||||
const parentSettlementData =
|
const parentSettlementData =
|
||||||
parentProduct && getDataSourceSpecForSettlementData(parentProduct);
|
parentMarketData?.tradableInstrument.instrument?.product
|
||||||
const parentSettlementScheduleData =
|
?.dataSourceSpecForSettlementData?.data;
|
||||||
parentProduct && getDataSourceSpecForSettlementSchedule(parentProduct);
|
const terminationData = marketData.tradableInstrument.instrument.product
|
||||||
|
.dataSourceSpecForTradingTermination.data as DataSourceDefinition;
|
||||||
const parentTerminationData =
|
const parentTerminationData =
|
||||||
parentProduct && getDataSourceSpecForTradingTermination(parentProduct);
|
parentMarketData?.tradableInstrument.instrument?.product
|
||||||
|
?.dataSourceSpecForTradingTermination?.data;
|
||||||
// TODO add settlementScheduleData for Perp Proposal
|
|
||||||
|
|
||||||
const isParentSettlementDataEqual =
|
const isParentSettlementDataEqual =
|
||||||
parentSettlementData !== undefined &&
|
parentSettlementData !== undefined &&
|
||||||
isEqual(settlementData, parentSettlementData);
|
isEqual(settlementData, parentSettlementData);
|
||||||
|
|
||||||
const isParentSettlementScheduleDataEqual =
|
|
||||||
parentSettlementData !== undefined &&
|
|
||||||
isEqual(settlementScheduleData, parentSettlementScheduleData);
|
|
||||||
|
|
||||||
const isParentTerminationDataEqual =
|
const isParentTerminationDataEqual =
|
||||||
parentTerminationData !== undefined &&
|
parentTerminationData !== undefined &&
|
||||||
isEqual(terminationData, parentTerminationData);
|
isEqual(terminationData, parentTerminationData);
|
||||||
@@ -98,6 +85,20 @@ export const ProposalMarketData = ({
|
|||||||
parentMarketData?.priceMonitoringSettings?.parameters?.triggers
|
parentMarketData?.priceMonitoringSettings?.parameters?.triggers
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const getSigners = (data: DataSourceDefinition) => {
|
||||||
|
if (data.sourceType.__typename === 'DataSourceDefinitionExternal') {
|
||||||
|
const signers = data.sourceType.sourceType.signers || [];
|
||||||
|
|
||||||
|
return signers.map(({ signer }) => {
|
||||||
|
return (
|
||||||
|
(signer.__typename === 'ETHAddress' && signer.address) ||
|
||||||
|
(signer.__typename === 'PubKey' && signer.key)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="relative" data-testid="proposal-market-data">
|
<section className="relative" data-testid="proposal-market-data">
|
||||||
<CollapsibleToggle
|
<CollapsibleToggle
|
||||||
@@ -128,9 +129,10 @@ export const ProposalMarketData = ({
|
|||||||
parentMarket={parentMarketData}
|
parentMarket={parentMarketData}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{settlementData &&
|
{isEqual(
|
||||||
terminationData &&
|
getSigners(settlementData),
|
||||||
isEqual(getSigners(settlementData), getSigners(terminationData)) ? (
|
getSigners(terminationData)
|
||||||
|
) ? (
|
||||||
<>
|
<>
|
||||||
<h2 className={marketDataHeaderStyles}>{t('Oracle')}</h2>
|
<h2 className={marketDataHeaderStyles}>{t('Oracle')}</h2>
|
||||||
|
|
||||||
@@ -138,17 +140,14 @@ export const ProposalMarketData = ({
|
|||||||
market={marketData}
|
market={marketData}
|
||||||
type="settlementData"
|
type="settlementData"
|
||||||
parentMarket={
|
parentMarket={
|
||||||
isParentSettlementDataEqual ||
|
isParentSettlementDataEqual ? undefined : parentMarketData
|
||||||
isParentSettlementScheduleDataEqual
|
|
||||||
? undefined
|
|
||||||
: parentMarketData
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<h2 className={marketDataHeaderStyles}>
|
<h2 className={marketDataHeaderStyles}>
|
||||||
{t('Settlement oracle')}
|
{t('Settlement Oracle')}
|
||||||
</h2>
|
</h2>
|
||||||
<OracleInfoPanel
|
<OracleInfoPanel
|
||||||
market={marketData}
|
market={marketData}
|
||||||
@@ -158,41 +157,16 @@ export const ProposalMarketData = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{marketData.tradableInstrument.instrument.product.__typename ===
|
<h2 className={marketDataHeaderStyles}>
|
||||||
'Future' && (
|
{t('Termination Oracle')}
|
||||||
<div>
|
</h2>
|
||||||
<h2 className={marketDataHeaderStyles}>
|
<OracleInfoPanel
|
||||||
{t('Termination oracle')}
|
market={marketData}
|
||||||
</h2>
|
type="termination"
|
||||||
<OracleInfoPanel
|
parentMarket={
|
||||||
market={marketData}
|
isParentTerminationDataEqual ? undefined : parentMarketData
|
||||||
type="termination"
|
}
|
||||||
parentMarket={
|
/>
|
||||||
isParentTerminationDataEqual
|
|
||||||
? undefined
|
|
||||||
: parentMarketData
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{marketData.tradableInstrument.instrument.product.__typename ===
|
|
||||||
'Perpetual' && (
|
|
||||||
<div>
|
|
||||||
<h2 className={marketDataHeaderStyles}>
|
|
||||||
{t('Settlement schedule oracle')}
|
|
||||||
</h2>
|
|
||||||
<OracleInfoPanel
|
|
||||||
market={marketData}
|
|
||||||
type="settlementSchedule"
|
|
||||||
parentMarket={
|
|
||||||
isParentSettlementScheduleDataEqual
|
|
||||||
? undefined
|
|
||||||
: parentMarketData
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -270,6 +244,14 @@ export const ProposalMarketData = ({
|
|||||||
market={marketData}
|
market={marketData}
|
||||||
parentMarket={parentMarketData}
|
parentMarket={parentMarketData}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<h2 className={marketDataHeaderStyles}>
|
||||||
|
{t('Liquidity price range')}
|
||||||
|
</h2>
|
||||||
|
<LiquidityPriceRangeInfoPanel
|
||||||
|
market={marketData}
|
||||||
|
parentMarket={parentMarketData}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export const Proposal = ({
|
|||||||
voteState={voteState}
|
voteState={voteState}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="my-10 break-all">
|
<div className="my-10">
|
||||||
<ProposalChangeTable proposal={proposal} />
|
<ProposalChangeTable proposal={proposal} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ query Proposal($proposalId: ID!) {
|
|||||||
... on NewMarket {
|
... on NewMarket {
|
||||||
decimalPlaces
|
decimalPlaces
|
||||||
metadata
|
metadata
|
||||||
|
lpPriceRange
|
||||||
riskParameters {
|
riskParameters {
|
||||||
... on LogNormalRiskModel {
|
... on LogNormalRiskModel {
|
||||||
riskAversionParameter
|
riskAversionParameter
|
||||||
@@ -151,6 +152,7 @@ query Proposal($proposalId: ID!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
positionDecimalPlaces
|
positionDecimalPlaces
|
||||||
|
lpPriceRange
|
||||||
linearSlippageFactor
|
linearSlippageFactor
|
||||||
quadraticSlippageFactor
|
quadraticSlippageFactor
|
||||||
}
|
}
|
||||||
@@ -160,13 +162,37 @@ query Proposal($proposalId: ID!) {
|
|||||||
instrument {
|
instrument {
|
||||||
code
|
code
|
||||||
product {
|
product {
|
||||||
... on UpdateFutureProduct {
|
quoteName
|
||||||
quoteName
|
dataSourceSpecForSettlementData {
|
||||||
dataSourceSpecForSettlementData {
|
sourceType {
|
||||||
sourceType {
|
... on DataSourceDefinitionInternal {
|
||||||
... on DataSourceDefinitionInternal {
|
sourceType {
|
||||||
sourceType {
|
... on DataSourceSpecConfigurationTime {
|
||||||
... on DataSourceSpecConfigurationTime {
|
conditions {
|
||||||
|
operator
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on DataSourceDefinitionExternal {
|
||||||
|
sourceType {
|
||||||
|
... on DataSourceSpecConfiguration {
|
||||||
|
signers {
|
||||||
|
signer {
|
||||||
|
... on PubKey {
|
||||||
|
key
|
||||||
|
}
|
||||||
|
... on ETHAddress {
|
||||||
|
address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filters {
|
||||||
|
key {
|
||||||
|
name
|
||||||
|
type
|
||||||
|
}
|
||||||
conditions {
|
conditions {
|
||||||
operator
|
operator
|
||||||
value
|
value
|
||||||
@@ -174,125 +200,52 @@ query Proposal($proposalId: ID!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
... on DataSourceDefinitionExternal {
|
|
||||||
sourceType {
|
|
||||||
... on DataSourceSpecConfiguration {
|
|
||||||
signers {
|
|
||||||
signer {
|
|
||||||
... on PubKey {
|
|
||||||
key
|
|
||||||
}
|
|
||||||
... on ETHAddress {
|
|
||||||
address
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
filters {
|
|
||||||
key {
|
|
||||||
name
|
|
||||||
type
|
|
||||||
}
|
|
||||||
conditions {
|
|
||||||
operator
|
|
||||||
value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# dataSourceSpecForTradingTermination {
|
|
||||||
# sourceType {
|
|
||||||
# ... on DataSourceDefinitionInternal {
|
|
||||||
# sourceType {
|
|
||||||
# ... on DataSourceSpecConfigurationTime {
|
|
||||||
# conditions {
|
|
||||||
# operator
|
|
||||||
# value
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# ... on DataSourceDefinitionExternal {
|
|
||||||
# sourceType {
|
|
||||||
# ... on DataSourceSpecConfiguration {
|
|
||||||
# signers {
|
|
||||||
# signer {
|
|
||||||
# ... on PubKey {
|
|
||||||
# key
|
|
||||||
# }
|
|
||||||
# ... on ETHAddress {
|
|
||||||
# address
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# filters {
|
|
||||||
# key {
|
|
||||||
# name
|
|
||||||
# type
|
|
||||||
# }
|
|
||||||
# conditions {
|
|
||||||
# operator
|
|
||||||
# value
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
dataSourceSpecBinding {
|
|
||||||
settlementDataProperty
|
|
||||||
tradingTerminationProperty
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
... on UpdatePerpetualProduct {
|
# dataSourceSpecForTradingTermination {
|
||||||
quoteName
|
# sourceType {
|
||||||
dataSourceSpecForSettlementData {
|
# ... on DataSourceDefinitionInternal {
|
||||||
sourceType {
|
# sourceType {
|
||||||
... on DataSourceDefinitionInternal {
|
# ... on DataSourceSpecConfigurationTime {
|
||||||
sourceType {
|
# conditions {
|
||||||
... on DataSourceSpecConfigurationTime {
|
# operator
|
||||||
conditions {
|
# value
|
||||||
operator
|
# }
|
||||||
value
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# ... on DataSourceDefinitionExternal {
|
||||||
}
|
# sourceType {
|
||||||
... on DataSourceDefinitionExternal {
|
# ... on DataSourceSpecConfiguration {
|
||||||
sourceType {
|
# signers {
|
||||||
... on DataSourceSpecConfiguration {
|
# signer {
|
||||||
signers {
|
# ... on PubKey {
|
||||||
signer {
|
# key
|
||||||
... on PubKey {
|
# }
|
||||||
key
|
# ... on ETHAddress {
|
||||||
}
|
# address
|
||||||
... on ETHAddress {
|
# }
|
||||||
address
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# filters {
|
||||||
}
|
# key {
|
||||||
filters {
|
# name
|
||||||
key {
|
# type
|
||||||
name
|
# }
|
||||||
type
|
# conditions {
|
||||||
}
|
# operator
|
||||||
conditions {
|
# value
|
||||||
operator
|
# }
|
||||||
value
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
dataSourceSpecBinding {
|
||||||
}
|
settlementDataProperty
|
||||||
dataSourceSpecBinding {
|
tradingTerminationProperty
|
||||||
settlementDataProperty
|
|
||||||
settlementScheduleProperty
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -6,11 +6,6 @@ import { MockedProvider } from '@apollo/client/testing';
|
|||||||
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
||||||
import { ProposalDocument } from './__generated__/Proposal';
|
import { ProposalDocument } from './__generated__/Proposal';
|
||||||
|
|
||||||
jest.mock('@vegaprotocol/data-provider', () => ({
|
|
||||||
...jest.requireActual('@vegaprotocol/data-provider'),
|
|
||||||
useDataProvider: jest.fn(() => ({ data: [], loading: false })),
|
|
||||||
}));
|
|
||||||
|
|
||||||
jest.mock('../components/proposal', () => ({
|
jest.mock('../components/proposal', () => ({
|
||||||
Proposal: () => <div data-testid="proposal" />,
|
Proposal: () => <div data-testid="proposal" />,
|
||||||
}));
|
}));
|
||||||
@@ -49,9 +44,7 @@ const renderComponent = (
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// These tests are broken due to schema changes. NewMarket.futureProduct -> NewMarket.product union
|
describe('Proposal container', () => {
|
||||||
// eslint-disable-next-line jest/no-disabled-tests
|
|
||||||
describe.skip('Proposal container', () => {
|
|
||||||
it('Renders not found if the proposal is not found', async () => {
|
it('Renders not found if the proposal is not found', async () => {
|
||||||
render(renderComponent(null, 'foo'));
|
render(renderComponent(null, 'foo'));
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
|||||||
import { gql } from '@apollo/client';
|
import { gql } from '@apollo/client';
|
||||||
import * as Apollo from '@apollo/client';
|
import * as Apollo from '@apollo/client';
|
||||||
const defaultOptions = {} as const;
|
const defaultOptions = {} as const;
|
||||||
export type ProposalFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename?: 'CancelTransfer' } | { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'NewSpotMarket' } | { __typename?: 'NewTransfer' } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateMarketState' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } | { __typename?: 'UpdateReferralProgram' } | { __typename?: 'UpdateSpotMarket' } | { __typename?: 'UpdateVolumeDiscountProgram' } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } };
|
export type ProposalFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename?: 'CancelTransfer' } | { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'NewTransfer' } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } };
|
||||||
|
|
||||||
export type ProposalsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
export type ProposalsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type ProposalsQuery = { __typename?: 'Query', proposalsConnection?: { __typename?: 'ProposalsConnection', edges?: Array<{ __typename?: 'ProposalEdge', node: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename?: 'CancelTransfer' } | { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'NewSpotMarket' } | { __typename?: 'NewTransfer' } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateMarketState' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } | { __typename?: 'UpdateReferralProgram' } | { __typename?: 'UpdateSpotMarket' } | { __typename?: 'UpdateVolumeDiscountProgram' } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } } } | null> | null } | null };
|
export type ProposalsQuery = { __typename?: 'Query', proposalsConnection?: { __typename?: 'ProposalsConnection', edges?: Array<{ __typename?: 'ProposalEdge', node: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename?: 'CancelTransfer' } | { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'NewTransfer' } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } } } | null> | null } | null };
|
||||||
|
|
||||||
export const ProposalFieldsFragmentDoc = gql`
|
export const ProposalFieldsFragmentDoc = gql`
|
||||||
fragment ProposalFields on Proposal {
|
fragment ProposalFields on Proposal {
|
||||||
|
|||||||
+2
@@ -352,6 +352,7 @@ export const ConsensusValidatorsTable = ({
|
|||||||
field: ValidatorFields.RANKING_INDEX,
|
field: ValidatorFields.RANKING_INDEX,
|
||||||
headerName: '#',
|
headerName: '#',
|
||||||
width: 60,
|
width: 60,
|
||||||
|
pinned: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: ValidatorFields.VALIDATOR,
|
field: ValidatorFields.VALIDATOR,
|
||||||
@@ -361,6 +362,7 @@ export const ConsensusValidatorsTable = ({
|
|||||||
if (a === b) return 0;
|
if (a === b) return 0;
|
||||||
return a > b ? 1 : -1;
|
return a > b ? 1 : -1;
|
||||||
},
|
},
|
||||||
|
pinned: 'left',
|
||||||
width: 260,
|
width: 260,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+2
@@ -195,12 +195,14 @@ export const StandbyPendingValidatorsTable = ({
|
|||||||
field: ValidatorFields.RANKING_INDEX,
|
field: ValidatorFields.RANKING_INDEX,
|
||||||
headerName: '#',
|
headerName: '#',
|
||||||
width: 60,
|
width: 60,
|
||||||
|
pinned: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: ValidatorFields.VALIDATOR,
|
field: ValidatorFields.VALIDATOR,
|
||||||
headerName: t(ValidatorFields.VALIDATOR).toString(),
|
headerName: t(ValidatorFields.VALIDATOR).toString(),
|
||||||
cellRenderer: ValidatorRenderer,
|
cellRenderer: ValidatorRenderer,
|
||||||
comparator: ({ name: a }, { name: b }) => Math.sign(a - b),
|
comparator: ({ name: a }, { name: b }) => Math.sign(a - b),
|
||||||
|
pinned: 'left',
|
||||||
width: 260,
|
width: 260,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -122,43 +122,38 @@ export const ValidatorTable = ({
|
|||||||
|
|
||||||
<div className="my-12" data-testid="validator-table">
|
<div className="my-12" data-testid="validator-table">
|
||||||
<SubHeading title={t('profile')} />
|
<SubHeading title={t('profile')} />
|
||||||
<div className="break-all">
|
<RoundedWrapper paddingBottom={true}>
|
||||||
<RoundedWrapper paddingBottom={true}>
|
<KeyValueTable data-testid="validator-table-profile">
|
||||||
<KeyValueTable data-testid="validator-table-profile">
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('id')}</span>
|
||||||
<span>{t('id')}</span>
|
<ValidatorTableCell dataTestId="validator-id">
|
||||||
<ValidatorTableCell dataTestId="validator-id">
|
{node.id}
|
||||||
{node.id}
|
</ValidatorTableCell>
|
||||||
</ValidatorTableCell>
|
</KeyValueTableRow>
|
||||||
</KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('ABOUT THIS VALIDATOR')}</span>
|
||||||
<span>{t('ABOUT THIS VALIDATOR')}</span>
|
|
||||||
|
|
||||||
<Tooltip description={t('AboutThisValidatorDescription')}>
|
<Tooltip description={t('AboutThisValidatorDescription')}>
|
||||||
<a
|
<a data-testid="validator-description-url" href={node.infoUrl}>
|
||||||
data-testid="validator-description-url"
|
{node.infoUrl}
|
||||||
href={node.infoUrl}
|
</a>
|
||||||
>
|
</Tooltip>
|
||||||
{node.infoUrl}
|
</KeyValueTableRow>
|
||||||
</a>
|
<KeyValueTableRow noBorder={true}>
|
||||||
</Tooltip>
|
<span>
|
||||||
</KeyValueTableRow>
|
<strong>{t('STATUS')}</strong>
|
||||||
<KeyValueTableRow noBorder={true}>
|
</span>
|
||||||
<span>
|
|
||||||
<strong>{t('STATUS')}</strong>
|
<Tooltip description={t('ValidatorStatusDescription')}>
|
||||||
|
<span data-testid="validator-status">
|
||||||
|
<strong>
|
||||||
|
{t(statusTranslationKey(node.rankingScore.status))}
|
||||||
|
</strong>
|
||||||
</span>
|
</span>
|
||||||
|
</Tooltip>
|
||||||
<Tooltip description={t('ValidatorStatusDescription')}>
|
</KeyValueTableRow>
|
||||||
<span data-testid="validator-status">
|
</KeyValueTable>
|
||||||
<strong>
|
</RoundedWrapper>
|
||||||
{t(statusTranslationKey(node.rankingScore.status))}
|
|
||||||
</strong>
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</KeyValueTableRow>
|
|
||||||
</KeyValueTable>
|
|
||||||
</RoundedWrapper>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mb-10">
|
<div className="mb-10">
|
||||||
{t('validatorTableIntro')}{' '}
|
{t('validatorTableIntro')}{' '}
|
||||||
@@ -172,154 +167,144 @@ export const ValidatorTable = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SubHeading title={t('ADDRESS')} />
|
<SubHeading title={t('ADDRESS')} />
|
||||||
<div className="break-all">
|
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
||||||
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
<KeyValueTable data-testid="validator-table-address">
|
||||||
<KeyValueTable data-testid="validator-table-address">
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('VEGA ADDRESS / PUBLIC KEY')}</span>
|
||||||
<span>{t('VEGA ADDRESS / PUBLIC KEY')}</span>
|
<ValidatorTableCell dataTestId="validator-public-key">
|
||||||
<ValidatorTableCell dataTestId="validator-public-key">
|
{node.pubkey}
|
||||||
{node.pubkey}
|
</ValidatorTableCell>
|
||||||
</ValidatorTableCell>
|
</KeyValueTableRow>
|
||||||
</KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('SERVER LOCATION')}</span>
|
||||||
<span>{t('SERVER LOCATION')}</span>
|
<ValidatorTableCell dataTestId="validator-server-location">
|
||||||
<ValidatorTableCell dataTestId="validator-server-location">
|
{countryData.find((c) => c.code === node.location)?.name ||
|
||||||
{countryData.find((c) => c.code === node.location)?.name ||
|
t('not available')}
|
||||||
t('not available')}
|
</ValidatorTableCell>
|
||||||
</ValidatorTableCell>
|
</KeyValueTableRow>
|
||||||
</KeyValueTableRow>
|
<KeyValueTableRow noBorder={true}>
|
||||||
<KeyValueTableRow noBorder={true}>
|
<span>{t('ETHEREUM ADDRESS')}</span>
|
||||||
<span>{t('ETHEREUM ADDRESS')}</span>
|
<span data-testid="validator-eth-address">
|
||||||
<span data-testid="validator-eth-address">
|
<Link
|
||||||
<Link
|
title={t('View on Etherscan (opens in a new tab)')}
|
||||||
title={t('View on Etherscan (opens in a new tab)')}
|
href={`${ETHERSCAN_URL}/address/${node.ethereumAddress}`}
|
||||||
href={`${ETHERSCAN_URL}/address/${node.ethereumAddress}`}
|
target="_blank"
|
||||||
target="_blank"
|
>
|
||||||
>
|
{node.ethereumAddress}
|
||||||
{node.ethereumAddress}
|
</Link>
|
||||||
</Link>
|
</span>
|
||||||
</span>
|
</KeyValueTableRow>
|
||||||
</KeyValueTableRow>
|
</KeyValueTable>
|
||||||
</KeyValueTable>
|
</RoundedWrapper>
|
||||||
</RoundedWrapper>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<SubHeading title={t('STAKE')} />
|
<SubHeading title={t('STAKE')} />
|
||||||
<div className="break-all">
|
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
||||||
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
<KeyValueTable data-testid="validator-table-stake">
|
||||||
<KeyValueTable data-testid="validator-table-stake">
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('STAKED BY OPERATOR')}</span>
|
||||||
<span>{t('STAKED BY OPERATOR')}</span>
|
|
||||||
|
|
||||||
<Tooltip description={t('StakedByOperatorDescription')}>
|
<Tooltip description={t('StakedByOperatorDescription')}>
|
||||||
<span data-testid="staked-by-operator">
|
<span data-testid="staked-by-operator">
|
||||||
{formatNumber(toBigNum(node.stakedByOperator, decimals))}
|
{formatNumber(toBigNum(node.stakedByOperator, decimals))}
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</KeyValueTableRow>
|
|
||||||
<KeyValueTableRow>
|
|
||||||
<span>{t('STAKED BY DELEGATES')}</span>
|
|
||||||
|
|
||||||
<Tooltip description={t('StakedByDelegatesDescription')}>
|
|
||||||
<span data-testid="staked-by-delegates">
|
|
||||||
{formatNumber(toBigNum(node.stakedByDelegates, decimals))}
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</KeyValueTableRow>
|
|
||||||
<KeyValueTableRow>
|
|
||||||
<span>
|
|
||||||
<strong>{t('TOTAL STAKE')}</strong>
|
|
||||||
</span>
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
</KeyValueTableRow>
|
||||||
|
<KeyValueTableRow>
|
||||||
|
<span>{t('STAKED BY DELEGATES')}</span>
|
||||||
|
|
||||||
<span data-testid="total-stake">
|
<Tooltip description={t('StakedByDelegatesDescription')}>
|
||||||
<strong>
|
<span data-testid="staked-by-delegates">
|
||||||
{formatNumber(toBigNum(node.stakedTotal, decimals))}
|
{formatNumber(toBigNum(node.stakedByDelegates, decimals))}
|
||||||
</strong>
|
|
||||||
</span>
|
</span>
|
||||||
</KeyValueTableRow>
|
</Tooltip>
|
||||||
<KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
<span>{t('PENDING STAKE')}</span>
|
<KeyValueTableRow>
|
||||||
|
<span>
|
||||||
|
<strong>{t('TOTAL STAKE')}</strong>
|
||||||
|
</span>
|
||||||
|
|
||||||
<Tooltip description={t('PendingStakeDescription')}>
|
<span data-testid="total-stake">
|
||||||
<span data-testid="pending-stake">
|
<strong>
|
||||||
{formatNumber(toBigNum(node.pendingStake, decimals))}
|
{formatNumber(toBigNum(node.stakedTotal, decimals))}
|
||||||
</span>
|
</strong>
|
||||||
</Tooltip>
|
</span>
|
||||||
</KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
<KeyValueTableRow noBorder={true}>
|
<KeyValueTableRow>
|
||||||
<span>{t('STAKE SHARE')}</span>
|
<span>{t('PENDING STAKE')}</span>
|
||||||
|
|
||||||
<Tooltip description={t('StakeShareDescription')}>
|
<Tooltip description={t('PendingStakeDescription')}>
|
||||||
<span data-testid="stake-percentage">{stakePercentage}</span>
|
<span data-testid="pending-stake">
|
||||||
</Tooltip>
|
{formatNumber(toBigNum(node.pendingStake, decimals))}
|
||||||
</KeyValueTableRow>
|
</span>
|
||||||
</KeyValueTable>
|
</Tooltip>
|
||||||
</RoundedWrapper>
|
</KeyValueTableRow>
|
||||||
</div>
|
<KeyValueTableRow noBorder={true}>
|
||||||
|
<span>{t('STAKE SHARE')}</span>
|
||||||
|
|
||||||
|
<Tooltip description={t('StakeShareDescription')}>
|
||||||
|
<span data-testid="stake-percentage">{stakePercentage}</span>
|
||||||
|
</Tooltip>
|
||||||
|
</KeyValueTableRow>
|
||||||
|
</KeyValueTable>
|
||||||
|
</RoundedWrapper>
|
||||||
|
|
||||||
<SubHeading title={t('PENALTIES')} />
|
<SubHeading title={t('PENALTIES')} />
|
||||||
<div className="break-all">
|
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
||||||
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
<KeyValueTable data-testid="validator-table-penalties">
|
||||||
<KeyValueTable data-testid="validator-table-penalties">
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('OVERSTAKED PENALTY')}</span>
|
||||||
<span>{t('OVERSTAKED PENALTY')}</span>
|
|
||||||
|
|
||||||
<Tooltip description={t('OverstakedPenaltyDescription')}>
|
<Tooltip description={t('OverstakedPenaltyDescription')}>
|
||||||
<span data-testid="overstaking-penalty">
|
<span data-testid="overstaking-penalty">
|
||||||
{formatNumberPercentage(penalties.overstaked, 2)}
|
{formatNumberPercentage(penalties.overstaked, 2)}
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
<span>{t('PERFORMANCE PENALTY')}</span>
|
<span>{t('PERFORMANCE PENALTY')}</span>
|
||||||
|
|
||||||
<Tooltip description={t('PerformancePenaltyDescription')}>
|
<Tooltip description={t('PerformancePenaltyDescription')}>
|
||||||
<span data-testid="performance-penalty">
|
<span data-testid="performance-penalty">
|
||||||
{formatNumberPercentage(penalties.performance, 2)}
|
{formatNumberPercentage(penalties.performance, 2)}
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</KeyValueTableRow>
|
|
||||||
<KeyValueTableRow noBorder={true}>
|
|
||||||
<span>
|
|
||||||
<strong>{t('TOTAL PENALTIES')}</strong>
|
|
||||||
</span>
|
</span>
|
||||||
<span data-testid="total-penalties">
|
</Tooltip>
|
||||||
<strong>
|
</KeyValueTableRow>
|
||||||
{formatNumberPercentage(penalties.overall, 2)}
|
<KeyValueTableRow noBorder={true}>
|
||||||
</strong>
|
<span>
|
||||||
</span>
|
<strong>{t('TOTAL PENALTIES')}</strong>
|
||||||
</KeyValueTableRow>
|
</span>
|
||||||
</KeyValueTable>
|
<span data-testid="total-penalties">
|
||||||
</RoundedWrapper>
|
<strong>{formatNumberPercentage(penalties.overall, 2)}</strong>
|
||||||
</div>
|
</span>
|
||||||
|
</KeyValueTableRow>
|
||||||
|
</KeyValueTable>
|
||||||
|
</RoundedWrapper>
|
||||||
|
|
||||||
<SubHeading title={t('VOTING POWER')} />
|
<SubHeading title={t('VOTING POWER')} />
|
||||||
<div className="break-all">
|
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
||||||
<RoundedWrapper marginBottomLarge={true} paddingBottom={true}>
|
<KeyValueTable data-testid="validator-table-voting-power">
|
||||||
<KeyValueTable data-testid="validator-table-voting-power">
|
<KeyValueTableRow>
|
||||||
<KeyValueTableRow>
|
<span>{t('UNNORMALISED VOTING POWER')}</span>
|
||||||
<span>{t('UNNORMALISED VOTING POWER')}</span>
|
|
||||||
|
|
||||||
<Tooltip description={t('UnnormalisedVotingPowerDescription')}>
|
<Tooltip description={t('UnnormalisedVotingPowerDescription')}>
|
||||||
<span data-testid="unnormalised-voting-power">
|
<span data-testid="unnormalised-voting-power">
|
||||||
{getUnnormalisedVotingPower(rawValidatorScore)}
|
{getUnnormalisedVotingPower(rawValidatorScore)}
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
</KeyValueTableRow>
|
|
||||||
<KeyValueTableRow noBorder={true}>
|
|
||||||
<span>
|
|
||||||
<strong>{t('NORMALISED VOTING POWER')}</strong>
|
|
||||||
</span>
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
</KeyValueTableRow>
|
||||||
|
<KeyValueTableRow noBorder={true}>
|
||||||
|
<span>
|
||||||
|
<strong>{t('NORMALISED VOTING POWER')}</strong>
|
||||||
|
</span>
|
||||||
|
|
||||||
<Tooltip description={t('NormalisedVotingPowerDescription')}>
|
<Tooltip description={t('NormalisedVotingPowerDescription')}>
|
||||||
<strong data-testid="normalised-voting-power">
|
<strong data-testid="normalised-voting-power">
|
||||||
{getNormalisedVotingPower(node.rankingScore.votingPower)}
|
{getNormalisedVotingPower(node.rankingScore.votingPower)}
|
||||||
</strong>
|
</strong>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</KeyValueTableRow>
|
</KeyValueTableRow>
|
||||||
</KeyValueTable>
|
</KeyValueTable>
|
||||||
</RoundedWrapper>
|
</RoundedWrapper>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export const TokenDetails = ({
|
|||||||
config.token_vesting_contract?.address || ENV.addresses.tokenVestingAddress;
|
config.token_vesting_contract?.address || ENV.addresses.tokenVestingAddress;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="token-details break-all">
|
<div className="token-details">
|
||||||
<RoundedWrapper>
|
<RoundedWrapper>
|
||||||
<KeyValueTable>
|
<KeyValueTable>
|
||||||
<KeyValueTableRow>
|
<KeyValueTableRow>
|
||||||
|
|||||||
+28
-7
@@ -35,7 +35,6 @@ import { HealthDialog } from '../../health-dialog';
|
|||||||
import { Status } from '../../status';
|
import { Status } from '../../status';
|
||||||
import { intentForStatus } from '../../../lib/utils';
|
import { intentForStatus } from '../../../lib/utils';
|
||||||
import { formatDistanceToNow } from 'date-fns';
|
import { formatDistanceToNow } from 'date-fns';
|
||||||
import { getAsset } from '@vegaprotocol/markets';
|
|
||||||
|
|
||||||
export const MarketList = () => {
|
export const MarketList = () => {
|
||||||
const { data, error, loading } = useMarketsLiquidity();
|
const { data, error, loading } = useMarketsLiquidity();
|
||||||
@@ -52,7 +51,12 @@ export const MarketList = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<span className="leading-3">{value}</span>
|
<span className="leading-3">{value}</span>
|
||||||
<span className="leading-3">{getAsset(data).symbol}</span>
|
<span className="leading-3">
|
||||||
|
{
|
||||||
|
data?.tradableInstrument?.instrument?.product?.settlementAsset
|
||||||
|
?.symbol
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -83,7 +87,12 @@ export const MarketList = () => {
|
|||||||
value,
|
value,
|
||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<Market, 'data.markPrice'>) =>
|
}: VegaValueFormatterParams<Market, 'data.markPrice'>) =>
|
||||||
value && data ? formatWithAsset(value, getAsset(data)) : '-',
|
value && data
|
||||||
|
? formatWithAsset(
|
||||||
|
value,
|
||||||
|
data.tradableInstrument.instrument.product.settlementAsset
|
||||||
|
)
|
||||||
|
: '-',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -114,7 +123,8 @@ export const MarketList = () => {
|
|||||||
value && data
|
value && data
|
||||||
? `${addDecimalsFormatNumber(
|
? `${addDecimalsFormatNumber(
|
||||||
value,
|
value,
|
||||||
getAsset(data).decimals || 0
|
data.tradableInstrument.instrument.product.settlementAsset
|
||||||
|
.decimals
|
||||||
)} (${displayChange(data.volumeChange)})`
|
)} (${displayChange(data.volumeChange)})`
|
||||||
: '-',
|
: '-',
|
||||||
headerTooltip: t('The trade volume over the last 24h'),
|
headerTooltip: t('The trade volume over the last 24h'),
|
||||||
@@ -128,7 +138,10 @@ export const MarketList = () => {
|
|||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<Market, 'liquidityCommitted'>) =>
|
}: VegaValueFormatterParams<Market, 'liquidityCommitted'>) =>
|
||||||
data && value
|
data && value
|
||||||
? formatWithAsset(value.toString(), getAsset(data))
|
? formatWithAsset(
|
||||||
|
value.toString(),
|
||||||
|
data.tradableInstrument.instrument.product.settlementAsset
|
||||||
|
)
|
||||||
: '-',
|
: '-',
|
||||||
headerTooltip: t('The amount of funds allocated to provide liquidity'),
|
headerTooltip: t('The amount of funds allocated to provide liquidity'),
|
||||||
},
|
},
|
||||||
@@ -140,7 +153,12 @@ export const MarketList = () => {
|
|||||||
value,
|
value,
|
||||||
data,
|
data,
|
||||||
}: VegaValueFormatterParams<Market, 'target'>) =>
|
}: VegaValueFormatterParams<Market, 'target'>) =>
|
||||||
data && value ? formatWithAsset(value, getAsset(data)) : '-',
|
data && value
|
||||||
|
? formatWithAsset(
|
||||||
|
value,
|
||||||
|
data.tradableInstrument.instrument.product.settlementAsset
|
||||||
|
)
|
||||||
|
: '-',
|
||||||
headerTooltip: t(
|
headerTooltip: t(
|
||||||
'The ideal committed liquidity to operate the market. If total commitment currently below this level then LPs can set the fee level with new commitment.'
|
'The ideal committed liquidity to operate the market. If total commitment currently below this level then LPs can set the fee level with new commitment.'
|
||||||
),
|
),
|
||||||
@@ -212,7 +230,10 @@ export const MarketList = () => {
|
|||||||
}) => (
|
}) => (
|
||||||
<HealthBar
|
<HealthBar
|
||||||
target={data.target}
|
target={data.target}
|
||||||
decimals={getAsset(data).decimals || 0}
|
decimals={
|
||||||
|
data.tradableInstrument.instrument.product.settlementAsset
|
||||||
|
.decimals
|
||||||
|
}
|
||||||
levels={data.feeLevels}
|
levels={data.feeLevels}
|
||||||
intent={intentForStatus(value)}
|
intent={intentForStatus(value)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
sumLiquidityCommitted,
|
sumLiquidityCommitted,
|
||||||
lpAggregatedDataProvider,
|
lpAggregatedDataProvider,
|
||||||
} from '@vegaprotocol/liquidity';
|
} from '@vegaprotocol/liquidity';
|
||||||
import { getAsset, marketWithDataProvider } from '@vegaprotocol/markets';
|
import { marketWithDataProvider } from '@vegaprotocol/markets';
|
||||||
import type { MarketWithData } from '@vegaprotocol/markets';
|
import type { MarketWithData } from '@vegaprotocol/markets';
|
||||||
|
|
||||||
import { Market } from './market';
|
import { Market } from './market';
|
||||||
@@ -19,8 +19,10 @@ import { LPProvidersGrid } from './providers';
|
|||||||
const formatMarket = (market: MarketWithData) => {
|
const formatMarket = (market: MarketWithData) => {
|
||||||
return {
|
return {
|
||||||
name: market?.tradableInstrument.instrument.name,
|
name: market?.tradableInstrument.instrument.name,
|
||||||
symbol: getAsset(market).symbol,
|
symbol:
|
||||||
settlementAsset: getAsset(market),
|
market?.tradableInstrument.instrument.product.settlementAsset.symbol,
|
||||||
|
settlementAsset:
|
||||||
|
market?.tradableInstrument.instrument.product.settlementAsset,
|
||||||
targetStake: market?.data?.targetStake,
|
targetStake: market?.data?.targetStake,
|
||||||
tradingMode: market?.data?.marketTradingMode,
|
tradingMode: market?.data?.marketTradingMode,
|
||||||
trigger: market?.data?.trigger,
|
trigger: market?.data?.trigger,
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ const marketTradingModeStyle = {
|
|||||||
[Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION]: '#0046CD',
|
[Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION]: '#0046CD',
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_BATCH_AUCTION]: '#CF0064',
|
[Schema.MarketTradingMode.TRADING_MODE_BATCH_AUCTION]: '#CF0064',
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_NO_TRADING]: '#CF0064',
|
[Schema.MarketTradingMode.TRADING_MODE_NO_TRADING]: '#CF0064',
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_SUSPENDED_VIA_GOVERNANCE]: '#CF0064',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getColorForStatus = (status: Schema.MarketTradingMode) =>
|
export const getColorForStatus = (status: Schema.MarketTradingMode) =>
|
||||||
@@ -19,8 +18,6 @@ const marketTradingModeIntent = {
|
|||||||
[Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION]: Intent.Primary,
|
[Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION]: Intent.Primary,
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_BATCH_AUCTION]: Intent.Danger,
|
[Schema.MarketTradingMode.TRADING_MODE_BATCH_AUCTION]: Intent.Danger,
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_NO_TRADING]: Intent.Danger,
|
[Schema.MarketTradingMode.TRADING_MODE_NO_TRADING]: Intent.Danger,
|
||||||
[Schema.MarketTradingMode.TRADING_MODE_SUSPENDED_VIA_GOVERNANCE]:
|
|
||||||
Intent.Danger,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const intentForStatus = (status: Schema.MarketTradingMode) => {
|
export const intentForStatus = (status: Schema.MarketTradingMode) => {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ NX_ETH_LOCAL_PROVIDER_URL=http://localhost:8545/
|
|||||||
NX_ETH_WALLET_MNEMONIC="ozone access unlock valid olympic save include omit supply green clown session"
|
NX_ETH_WALLET_MNEMONIC="ozone access unlock valid olympic save include omit supply green clown session"
|
||||||
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
||||||
NX_SENTRY_DSN=https://dummy@o999999.ingest.sentry.io/9999999
|
NX_SENTRY_DSN=https://dummy@o999999.ingest.sentry.io/9999999
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# Expose some env vars to cypress environment for market setup
|
# Expose some env vars to cypress environment for market setup
|
||||||
CYPRESS_ETH_WALLET_MNEMONIC=ozone access unlock valid olympic save include omit supply green clown session
|
CYPRESS_ETH_WALLET_MNEMONIC=ozone access unlock valid olympic save include omit supply green clown session
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ NX_VEGA_URL=http://localhost:3008/graphql
|
|||||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||||
NX_ETH_LOCAL_PROVIDER_URL=http://localhost:8545/
|
NX_ETH_LOCAL_PROVIDER_URL=http://localhost:8545/
|
||||||
NX_ETH_WALLET_MNEMONIC="ozone access unlock valid olympic save include omit supply green clown session"
|
NX_ETH_WALLET_MNEMONIC="ozone access unlock valid olympic save include omit supply green clown session"
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# Expose some env vars to cypress environment for market setup
|
# Expose some env vars to cypress environment for market setup
|
||||||
CYPRESS_ETH_WALLET_MNEMONIC=ozone access unlock valid olympic save include omit supply green clown session
|
CYPRESS_ETH_WALLET_MNEMONIC=ozone access unlock valid olympic save include omit supply green clown session
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ describe('deposit actions', { tags: '@smoke' }, () => {
|
|||||||
cy.visit('/#/markets/market-1');
|
cy.visit('/#/markets/market-1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Deposit to trade is visible', () => {
|
it('Deposit to trade is visible', () => {
|
||||||
cy.getByTestId('Collateral').click();
|
cy.getByTestId('Collateral').click();
|
||||||
cy.get('[row-id="asset-id"]').contains('tEURO').should('be.visible');
|
cy.get('[row-id="asset-id"]').contains('tEURO').should('be.visible');
|
||||||
cy.contains('[data-testid="deposit"]', 'Deposit').should('be.visible');
|
cy.contains('[data-testid="deposit"]', 'Deposit').should('be.visible');
|
||||||
|
|||||||
@@ -0,0 +1,256 @@
|
|||||||
|
import { MarketTradingModeMapping } from '@vegaprotocol/types';
|
||||||
|
import { MarketState } from '@vegaprotocol/types';
|
||||||
|
import compact from 'lodash/compact';
|
||||||
|
|
||||||
|
const accordionContent = 'accordion-content';
|
||||||
|
const blockExplorerLink = 'block-explorer-link';
|
||||||
|
const dialogClose = 'dialog-close';
|
||||||
|
const dialogContent = 'dialog-content';
|
||||||
|
const externalLink = 'external-link';
|
||||||
|
const githubLink = 'github-link';
|
||||||
|
const liquidityLink = 'view-liquidity-link';
|
||||||
|
const marketInfoBtn = 'Info';
|
||||||
|
const marketTitle = 'accordion-title';
|
||||||
|
const providerName = 'provider-name';
|
||||||
|
const row = 'key-value-table-row';
|
||||||
|
const verifiedProofs = 'verified-proofs';
|
||||||
|
|
||||||
|
describe('market info is displayed', { tags: '@smoke' }, () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.mockTradingPage();
|
||||||
|
});
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
cy.setOnBoardingViewed();
|
||||||
|
cy.mockTradingPage(MarketState.STATE_ACTIVE);
|
||||||
|
cy.mockSubscription();
|
||||||
|
cy.visit('/#/markets/market-0');
|
||||||
|
cy.wait('@Markets');
|
||||||
|
cy.getByTestId(marketInfoBtn).click();
|
||||||
|
cy.wait('@MarketInfo');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('current fees displayed', () => {
|
||||||
|
// 6002-MDET-101
|
||||||
|
cy.getByTestId(marketTitle).contains('Current fees').click();
|
||||||
|
validateMarketDataRow(0, 'Maker Fee', '0.02%');
|
||||||
|
validateMarketDataRow(1, 'Infrastructure Fee', '0.05%');
|
||||||
|
validateMarketDataRow(2, 'Liquidity Fee', '1.00%');
|
||||||
|
validateMarketDataRow(3, 'Total Fees', '1.07%');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('market price', () => {
|
||||||
|
// 6002-MDET-102
|
||||||
|
cy.getByTestId(marketTitle).contains('Market price').click();
|
||||||
|
validateMarketDataRow(0, 'Mark Price', '46,126.90058');
|
||||||
|
validateMarketDataRow(1, 'Best Bid Price', '44,126.90058 ');
|
||||||
|
validateMarketDataRow(2, 'Best Offer Price', '48,126.90058 ');
|
||||||
|
validateMarketDataRow(3, 'Quote Unit', 'BTC');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('market volume displayed', () => {
|
||||||
|
// 6002-MDET-103
|
||||||
|
cy.getByTestId(marketTitle).contains('Market volume').click();
|
||||||
|
validateMarketDataRow(1, 'Open Interest', '-');
|
||||||
|
validateMarketDataRow(2, 'Best Bid Volume', '1');
|
||||||
|
validateMarketDataRow(3, 'Best Offer Volume', '3');
|
||||||
|
validateMarketDataRow(4, 'Best Static Bid Volume', '2');
|
||||||
|
validateMarketDataRow(5, 'Best Static Offer Volume', '4');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('insurance pool displayed', () => {
|
||||||
|
// 6002-MDET-104
|
||||||
|
cy.getByTestId(marketTitle).contains('Insurance pool').click();
|
||||||
|
validateMarketDataRow(0, 'Balance', '0');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('key details displayed', () => {
|
||||||
|
// 6002-MDET-201
|
||||||
|
cy.getByTestId(marketTitle).contains('Key details').click();
|
||||||
|
|
||||||
|
const rows: [string, string][] = compact([
|
||||||
|
['Name', 'BTCUSD Monthly (30 Jun 2022)'],
|
||||||
|
['Market ID', 'market-0'],
|
||||||
|
Cypress.env('NX_SUCCESSOR_MARKETS') && ['Parent Market ID', 'PARENT-A'],
|
||||||
|
Cypress.env('NX_SUCCESSOR_MARKETS') && [
|
||||||
|
'Insurance Pool Fraction',
|
||||||
|
'0.75',
|
||||||
|
],
|
||||||
|
['Trading Mode', MarketTradingModeMapping.TRADING_MODE_CONTINUOUS],
|
||||||
|
['Market Decimal Places', '5'],
|
||||||
|
['Position Decimal Places', '0'],
|
||||||
|
['Settlement Asset Decimal Places', '5'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
for (const rowNumber in rows) {
|
||||||
|
const [name, value] = rows[rowNumber];
|
||||||
|
validateMarketDataRow(Number(rowNumber), name, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('instrument displayed', () => {
|
||||||
|
// 6002-MDET-202
|
||||||
|
cy.getByTestId(marketTitle).contains('Instrument').click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Market Name', 'BTCUSD Monthly (30 Jun 2022)');
|
||||||
|
validateMarketDataRow(1, 'Code', 'BTCUSD.MF21');
|
||||||
|
validateMarketDataRow(2, 'Product Type', 'Future');
|
||||||
|
validateMarketDataRow(3, 'Quote Name', 'BTC');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('oracle displayed', () => {
|
||||||
|
// 6002-MDET-203
|
||||||
|
cy.getByTestId(marketTitle).contains('Oracle').click();
|
||||||
|
|
||||||
|
cy.getByTestId(accordionContent)
|
||||||
|
.getByTestId(providerName)
|
||||||
|
.and('contain', 'Another oracle');
|
||||||
|
|
||||||
|
cy.getByTestId(providerName).should('be.visible').click();
|
||||||
|
cy.getByTestId(dialogContent)
|
||||||
|
.eq(1)
|
||||||
|
.within(() => {
|
||||||
|
cy.getByTestId(blockExplorerLink).contains('Block explorer');
|
||||||
|
cy.getByTestId(githubLink).contains('Oracle repository');
|
||||||
|
});
|
||||||
|
cy.getByTestId(dialogClose).click();
|
||||||
|
|
||||||
|
cy.getByTestId(accordionContent)
|
||||||
|
.getByTestId(verifiedProofs)
|
||||||
|
.and('contain', '1');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('settlement asset displayed', () => {
|
||||||
|
// 6002-MDET-206
|
||||||
|
cy.getByTestId(marketTitle).contains('Settlement asset').click();
|
||||||
|
cy.window().then((win) => {
|
||||||
|
cy.stub(win, 'prompt').returns('DISABLED WINDOW PROMPT');
|
||||||
|
});
|
||||||
|
validateMarketDataRow(0, 'ID', 'asset-id');
|
||||||
|
validateMarketDataRow(1, 'Type', 'ERC20');
|
||||||
|
validateMarketDataRow(2, 'Name', 'Euro');
|
||||||
|
validateMarketDataRow(3, 'Symbol', 'tEURO');
|
||||||
|
validateMarketDataRow(4, 'Decimals', '5');
|
||||||
|
validateMarketDataRow(5, 'Quantum', '1');
|
||||||
|
validateMarketDataRow(6, 'Status', 'Enabled');
|
||||||
|
validateMarketDataRow(7, 'Contract address', '0x0158…78a4');
|
||||||
|
validateMarketDataRow(8, 'Withdrawal threshold', '0.0005');
|
||||||
|
validateMarketDataRow(9, 'Lifetime limit', '1,230');
|
||||||
|
validateMarketDataRow(10, 'Infrastructure fee account balance', '0.00001');
|
||||||
|
validateMarketDataRow(11, 'Global reward pool account balance', '0.00002');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('metadata displayed', () => {
|
||||||
|
// 6002-MDET-207
|
||||||
|
cy.getByTestId(marketTitle).contains('Metadata').click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Formerly', '076BB86A5AA41E3E');
|
||||||
|
validateMarketDataRow(1, 'Base', 'BTC');
|
||||||
|
validateMarketDataRow(2, 'Quote', 'USD');
|
||||||
|
validateMarketDataRow(3, 'Class', 'fx/crypto');
|
||||||
|
validateMarketDataRow(4, 'Sector', 'crypto');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('risk model displayed', () => {
|
||||||
|
// 6002-MDET-208
|
||||||
|
cy.getByTestId(marketTitle).contains('Risk model').click();
|
||||||
|
validateMarketDataRow(0, 'Tau', '0.0001140771161');
|
||||||
|
validateMarketDataRow(1, 'Risk Aversion Parameter', '0.01');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('risk parameters displayed', () => {
|
||||||
|
// 6002-MDET-209
|
||||||
|
cy.getByTestId(marketTitle).contains('Risk parameters').click();
|
||||||
|
validateMarketDataRow(0, 'R', '0.016');
|
||||||
|
validateMarketDataRow(1, 'Sigma', '0.3');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('risk factors displayed', () => {
|
||||||
|
// 6002-MDET-210
|
||||||
|
cy.getByTestId(marketTitle).contains('Risk factors').click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Short', '0.008571790367285281');
|
||||||
|
validateMarketDataRow(1, 'Long', '0.008508132993273576');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('price monitoring bounds displayed', () => {
|
||||||
|
// 6002-MDET-211
|
||||||
|
cy.getByTestId(marketTitle).contains('Price monitoring bounds 1').click();
|
||||||
|
cy.get('p.col-span-1').contains('99.99999% probability price bounds');
|
||||||
|
cy.get('p.col-span-1').contains('Within 43,200 seconds');
|
||||||
|
validateMarketDataRow(0, 'Highest Price', '7.97323 ');
|
||||||
|
validateMarketDataRow(1, 'Lowest Price', '6.54701 ');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('liquidity monitoring parameters displayed', () => {
|
||||||
|
// 6002-MDET-212
|
||||||
|
cy.getByTestId(marketTitle)
|
||||||
|
.contains('Liquidity monitoring parameters')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Triggering Ratio', '0.7');
|
||||||
|
validateMarketDataRow(1, 'Time Window', '3,600');
|
||||||
|
validateMarketDataRow(2, 'Scaling Factor', '10');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('liquidity displayed', () => {
|
||||||
|
// 6002-MDET-213
|
||||||
|
cy.getByTestId(marketTitle)
|
||||||
|
.contains(/Liquidity(?! m)/)
|
||||||
|
.click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Target Stake', '10.00 tBTC');
|
||||||
|
validateMarketDataRow(1, 'Supplied Stake', '0.01 tBTC');
|
||||||
|
validateMarketDataRow(2, 'Market Value Proxy', '20.00 tBTC');
|
||||||
|
cy.getByTestId(liquidityLink).should(
|
||||||
|
'have.text',
|
||||||
|
'View liquidity provision table'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('liquidity price range displayed', () => {
|
||||||
|
// 6002-MDET-214
|
||||||
|
cy.getByTestId(marketTitle).contains('Liquidity price range').click();
|
||||||
|
|
||||||
|
validateMarketDataRow(0, 'Liquidity Price Range', '2.00% of mid price');
|
||||||
|
validateMarketDataRow(1, 'Lowest Price', '45,204.362 BTC');
|
||||||
|
validateMarketDataRow(2, 'Highest Price', '47,049.438 BTC');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('proposal displayed', () => {
|
||||||
|
// 6002-MDET-301
|
||||||
|
cy.getByTestId(marketTitle).contains('Proposal').click();
|
||||||
|
|
||||||
|
cy.getByTestId(accordionContent)
|
||||||
|
.find(`[data-testid="${externalLink}"]`)
|
||||||
|
.first()
|
||||||
|
.should('have.text', 'View governance proposal')
|
||||||
|
.and('have.attr', 'href')
|
||||||
|
.and('contain', '/proposals/market-0');
|
||||||
|
cy.getByTestId(accordionContent)
|
||||||
|
.find(`[data-testid="${externalLink}"]`)
|
||||||
|
.eq(1)
|
||||||
|
.should('have.text', 'Propose a change to market')
|
||||||
|
.and('have.attr', 'href')
|
||||||
|
.and('contain', '/proposals/propose/update-market');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach('close toggle', () => {
|
||||||
|
cy.get('[data-state="open"]').then((tab) => {
|
||||||
|
if (tab) tab.find('button').trigger('click');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function validateMarketDataRow(
|
||||||
|
rowNumber: number,
|
||||||
|
name: string,
|
||||||
|
value: string
|
||||||
|
) {
|
||||||
|
cy.getByTestId(row)
|
||||||
|
.eq(rowNumber)
|
||||||
|
.within(() => {
|
||||||
|
cy.get('dt').should('contain.text', name);
|
||||||
|
cy.get('dd').should('contain.text', value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -24,7 +24,9 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.mockTradingPage();
|
cy.mockTradingPage();
|
||||||
cy.getByTestId('deal-ticket-fee-margin-required').click();
|
cy.getByTestId('deal-ticket-fee-margin-required').within(() => {
|
||||||
|
cy.get('button').click();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('limit order', () => {
|
describe('limit order', () => {
|
||||||
@@ -109,7 +111,6 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
|
|||||||
'Total margin available100.01 tDAI'
|
'Total margin available100.01 tDAI'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
cy.getByTestId('deal-ticket-fee-margin-required').click();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('must have current margin allocation', () => {
|
it('must have current margin allocation', () => {
|
||||||
@@ -119,7 +120,6 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
|
|||||||
'Current margin allocation'
|
'Current margin allocation'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
cy.getByTestId('deal-ticket-fee-margin-required').click();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open usage breakdown dialog when clicked on current margin allocation', () => {
|
it('should open usage breakdown dialog when clicked on current margin allocation', () => {
|
||||||
@@ -128,7 +128,6 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
cy.getByTestId('usage-breakdown').should('exist');
|
cy.getByTestId('usage-breakdown').should('exist');
|
||||||
cy.getByTestId('dialog-close').click();
|
cy.getByTestId('dialog-close').click();
|
||||||
cy.getByTestId('deal-ticket-fee-margin-required').click();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ describe('trades', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('copy price to deal ticket form', () => {
|
it('copy price to deal ticket form', () => {
|
||||||
|
cy.getByTestId('Order').click();
|
||||||
// 6005-THIS-007
|
// 6005-THIS-007
|
||||||
cy.getByTestId('order-type-Limit').click();
|
|
||||||
cy.get(colIdPrice).last().should('be.visible').click();
|
cy.get(colIdPrice).last().should('be.visible').click();
|
||||||
cy.getByTestId('order-price').should('have.value', '171.16898');
|
cy.getByTestId('order-price').should('have.value', '171.16898');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ const dialogContent = 'dialog-content';
|
|||||||
describe('connect vega wallet', { tags: '@smoke', testIsolation: true }, () => {
|
describe('connect vega wallet', { tags: '@smoke', testIsolation: true }, () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Using portfolio page as it requires vega wallet connection
|
// Using portfolio page as it requires vega wallet connection
|
||||||
|
cy.visit('/#/portfolio');
|
||||||
cy.mockTradingPage();
|
cy.mockTradingPage();
|
||||||
cy.mockSubscription();
|
cy.mockSubscription();
|
||||||
cy.setOnBoardingViewed();
|
cy.setOnBoardingViewed();
|
||||||
cy.visit('/#/portfolio');
|
|
||||||
cy.get('[data-testid="pathname-/portfolio"]').should('exist');
|
cy.get('[data-testid="pathname-/portfolio"]').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ const mockTradingPage = (
|
|||||||
tradableInstrument: {
|
tradableInstrument: {
|
||||||
instrument: {
|
instrument: {
|
||||||
product: {
|
product: {
|
||||||
__typename: 'Future',
|
|
||||||
dataSourceSpecForSettlementData: {
|
dataSourceSpecForSettlementData: {
|
||||||
data: {
|
data: {
|
||||||
sourceType: {
|
sourceType: {
|
||||||
|
|||||||
+7
-10
@@ -1,30 +1,27 @@
|
|||||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
|
||||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||||
NX_SENTRY_DSN=https://2ffce43721964aafa78277c50654ece4@o286262.ingest.sentry.io/6300613
|
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_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml
|
||||||
NX_VEGA_ENV=STAGNET1
|
NX_VEGA_ENV=STAGNET1
|
||||||
NX_VEGA_EXPLORER_URL=https://explorer.stagnet1.vega.rocks
|
NX_VEGA_EXPLORER_URL=https://explorer.stagnet1.vega.rocks
|
||||||
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\"}
|
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.stagnet1.vega.rocks
|
NX_VEGA_TOKEN_URL=https://governance.fairground.wtf
|
||||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/main/announcements.json
|
||||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
NX_STOP_ORDERS=true
|
NX_STOP_ORDERS=true
|
||||||
NX_ICEBERG_ORDERS=true
|
# NX_ICEBERG_ORDERS
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=true
|
NX_METAMASK_SNAPS=true
|
||||||
NX_REFERRALS=true
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
NX_TENDERMINT_URL=https://tm.n01.stagnet1.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.n01.stagnet1.vega.xyz/websocket
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ NX_STOP_ORDERS=false
|
|||||||
# NX_ICEBERG_ORDERS
|
# NX_ICEBERG_ORDERS
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=false
|
NX_METAMASK_SNAPS=false
|
||||||
NX_REFERRALS=false
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=http://localhost:26617
|
NX_TENDERMINT_URL=http://localhost:26617
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ NX_STOP_ORDERS=true
|
|||||||
# NX_ICEBERG_ORDERS
|
# NX_ICEBERG_ORDERS
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=true
|
NX_METAMASK_SNAPS=true
|
||||||
NX_REFERRALS=true
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
|||||||
NX_VEGA_CONSOLE_URL=https://console.vega.xyz
|
NX_VEGA_CONSOLE_URL=https://console.vega.xyz
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-mainnet/codfcglpplgmmlokgilfkpcjnmkbfiel
|
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-mainnet/codfcglpplgmmlokgilfkpcjnmkbfiel
|
||||||
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-mainnet
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-mainnet
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
# TAG name of the current app version - TODO: bump to the latest upon release
|
||||||
|
NX_APP_VERSION=v0.21.0-core-0.72.14
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
NX_STOP_ORDERS=true
|
NX_STOP_ORDERS=true
|
||||||
NX_ICEBERG_ORDERS=true
|
NX_ICEBERG_ORDERS=true
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=true
|
NX_METAMASK_SNAPS=false
|
||||||
NX_REFERRALS=false
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.vega.community
|
NX_TENDERMINT_URL=https://be.vega.community
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ NX_STOP_ORDERS=true
|
|||||||
NX_ICEBERG_ORDERS=true
|
NX_ICEBERG_ORDERS=true
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=false
|
NX_METAMASK_SNAPS=false
|
||||||
NX_REFERRALS=false
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
NX_TENDERMINT_URL=https://be.mainnet-mirror.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/annou
|
|||||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
@@ -24,4 +22,3 @@ NX_STOP_ORDERS=true
|
|||||||
NX_ICEBERG_ORDERS=true
|
NX_ICEBERG_ORDERS=true
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=true
|
NX_METAMASK_SNAPS=true
|
||||||
NX_REFERRALS=true
|
|
||||||
@@ -16,15 +16,13 @@ NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
|||||||
NX_VEGA_CONSOLE_URL=https://console.fairground.wtf
|
NX_VEGA_CONSOLE_URL=https://console.fairground.wtf
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
NX_STOP_ORDERS=true
|
NX_STOP_ORDERS=true
|
||||||
NX_ICEBERG_ORDERS=true
|
NX_ICEBERG_ORDERS=true
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=true
|
NX_METAMASK_SNAPS=false
|
||||||
NX_REFERRALS=true
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ NX_VEGA_CONSOLE_URL=https://trading.validators-testnet.vega.rocks
|
|||||||
|
|
||||||
NX_CHROME_EXTENSION_URL=https://chrome.google.com/webstore/detail/vega-wallet-fairground/nmmjkiafpmphlikhefgjbblebfgclikn
|
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
|
NX_MOZILLA_EXTENSION_URL=https://addons.mozilla.org/firefox/addon/vega-wallet-fairground
|
||||||
NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/main/__generated__/oracle-proofs.json
|
|
||||||
|
|
||||||
# Cosmic elevator flags
|
# Cosmic elevator flags
|
||||||
NX_SUCCESSOR_MARKETS=true
|
NX_SUCCESSOR_MARKETS=true
|
||||||
@@ -25,7 +24,6 @@ NX_STOP_ORDERS=true
|
|||||||
NX_ICEBERG_ORDERS=true
|
NX_ICEBERG_ORDERS=true
|
||||||
# NX_PRODUCT_PERPETUALS
|
# NX_PRODUCT_PERPETUALS
|
||||||
NX_METAMASK_SNAPS=false
|
NX_METAMASK_SNAPS=false
|
||||||
NX_REFERRALS=false
|
|
||||||
|
|
||||||
NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.rocks
|
NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.rocks
|
||||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket
|
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import { t } from '@vegaprotocol/i18n';
|
|
||||||
import { Links } from '../../lib/links';
|
|
||||||
import classNames from 'classnames';
|
|
||||||
import { NavLink, Outlet } from 'react-router-dom';
|
|
||||||
|
|
||||||
export const Assets = () => {
|
|
||||||
const linkClasses = ({ isActive }: { isActive: boolean }) => {
|
|
||||||
return classNames('border-b-2 border-transparent', {
|
|
||||||
'border-vega-yellow': isActive,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="max-w-[500px] px-4 mx-auto my-8">
|
|
||||||
<nav className="flex mb-6 text-lg gap-4">
|
|
||||||
<NavLink to={Links.DEPOSIT()} className={linkClasses}>
|
|
||||||
{t('Deposit')}
|
|
||||||
</NavLink>
|
|
||||||
<NavLink to={Links.WITHDRAW()} className={linkClasses}>
|
|
||||||
{t('Withdraw')}
|
|
||||||
</NavLink>
|
|
||||||
<NavLink to={Links.TRANSFER()} className={linkClasses}>
|
|
||||||
{t('Transfer')}
|
|
||||||
</NavLink>
|
|
||||||
</nav>
|
|
||||||
<div className="pt-4 border-t md:p-6 md:border md:rounded-xl border-default">
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { Assets } from './assets';
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import { t } from '@vegaprotocol/i18n';
|
|
||||||
import { Intent, TradingAnchorButton } from '@vegaprotocol/ui-toolkit';
|
|
||||||
import { GetStartedCheckList } from '../../components/welcome-dialog';
|
|
||||||
import {
|
|
||||||
useGetOnboardingStep,
|
|
||||||
useOnboardingStore,
|
|
||||||
OnboardingStep,
|
|
||||||
} from '../../components/welcome-dialog/use-get-onboarding-step';
|
|
||||||
import { Links } from '../../lib/links';
|
|
||||||
import classNames from 'classnames';
|
|
||||||
|
|
||||||
export const DepositGetStarted = () => {
|
|
||||||
const onboardingDismissed = useOnboardingStore((store) => store.dismissed);
|
|
||||||
const dismiss = useOnboardingStore((store) => store.dismiss);
|
|
||||||
const step = useGetOnboardingStep();
|
|
||||||
const wrapperClasses = classNames(
|
|
||||||
'flex flex-col py-4 px-6 gap-4 rounded',
|
|
||||||
'bg-vega-blue-300 dark:bg-vega-blue-700',
|
|
||||||
'border border-vega-blue-350 dark:border-vega-blue-650'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Dont show unless still onboarding
|
|
||||||
if (onboardingDismissed) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="pt-6 border-t border-default">
|
|
||||||
<div className={wrapperClasses}>
|
|
||||||
<h3 className="text-lg">{t('Get started')}</h3>
|
|
||||||
<GetStartedCheckList />
|
|
||||||
{step > OnboardingStep.ONBOARDING_DEPOSIT_STEP && (
|
|
||||||
<TradingAnchorButton
|
|
||||||
href={Links.HOME()}
|
|
||||||
onClick={() => dismiss()}
|
|
||||||
intent={Intent.Info}
|
|
||||||
>
|
|
||||||
{t('Start trading')}
|
|
||||||
</TradingAnchorButton>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import { render, screen } from '@testing-library/react';
|
|
||||||
import { MemoryRouter } from 'react-router-dom';
|
|
||||||
import { Deposit } from './deposit';
|
|
||||||
|
|
||||||
jest.mock('@vegaprotocol/deposits', () => ({
|
|
||||||
DepositContainer: ({ assetId }: { assetId?: string }) => (
|
|
||||||
<div data-testid="assetId">{assetId}</div>
|
|
||||||
),
|
|
||||||
}));
|
|
||||||
|
|
||||||
jest.mock('./deposit-get-started', () => ({
|
|
||||||
DepositGetStarted: () => <div>DepositGetStarted</div>,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const renderJsx = (route = '/deposit') => {
|
|
||||||
render(
|
|
||||||
<MemoryRouter initialEntries={[route]}>
|
|
||||||
<Deposit />
|
|
||||||
</MemoryRouter>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
describe('Deposit page', () => {
|
|
||||||
it('assetId should be passed down', () => {
|
|
||||||
const assetId = 'foo';
|
|
||||||
const route = '/deposit?assetId=' + assetId;
|
|
||||||
renderJsx(route);
|
|
||||||
expect(screen.getByTestId('assetId')).toHaveTextContent(assetId);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
import { DepositContainer } from '@vegaprotocol/deposits';
|
import { DepositContainer } from '@vegaprotocol/deposits';
|
||||||
import { useSearchParams } from 'react-router-dom';
|
import { GetStarted } from '../../components/welcome-dialog';
|
||||||
import { DepositGetStarted } from './deposit-get-started';
|
import { t } from '@vegaprotocol/i18n';
|
||||||
|
|
||||||
export const Deposit = () => {
|
export const Deposit = () => {
|
||||||
const [searchParams] = useSearchParams();
|
|
||||||
const assetId = searchParams.get('assetId') || undefined;
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-6">
|
<div className="py-16 px-8 flex w-full justify-center">
|
||||||
<DepositContainer assetId={assetId} />
|
<div className="lg:min-w-[700px] min-w-[300px] max-w-[700px]">
|
||||||
<DepositGetStarted />
|
<h1 className="text-4xl xl:text-5xl uppercase font-alpha calt">
|
||||||
|
{t('Deposit')}
|
||||||
|
</h1>
|
||||||
|
<div className="mt-10">
|
||||||
|
<DepositContainer />
|
||||||
|
<GetStarted />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
export { Deposit } from './deposit';
|
import { Deposit } from './deposit';
|
||||||
|
|
||||||
|
export default Deposit;
|
||||||
|
|||||||
@@ -2,45 +2,47 @@ import { t } from '@vegaprotocol/i18n';
|
|||||||
|
|
||||||
export const Disclaimer = () => {
|
export const Disclaimer = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="py-16 px-8 flex w-full justify-center">
|
||||||
<h1 className="text-4xl uppercase xl:text-5xl font-alpha calt">
|
<div className="lg:min-w-[700px] min-w-[300px] max-w-[700px]">
|
||||||
{t('Disclaimer')}
|
<h1 className="text-4xl xl:text-5xl uppercase font-alpha calt">
|
||||||
</h1>
|
{t('Disclaimer')}
|
||||||
<p className="mt-10 mb-6">
|
</h1>
|
||||||
{t(
|
<p className="mb-6 mt-10">
|
||||||
'Vega is a decentralised peer-to-peer protocol that can be used to trade derivatives with cryptoassets. The Vega Protocol is an implementation layer (layer one) protocol made of free, public, open-source or source-available software. Use of the Vega Protocol involves various risks, including but not limited to, losses while digital assets are supplied to the Vega Protocol and losses due to the fluctuation of prices of assets.'
|
{t(
|
||||||
)}
|
'Vega is a decentralised peer-to-peer protocol that can be used to trade derivatives with cryptoassets. The Vega Protocol is an implementation layer (layer one) protocol made of free, public, open-source or source-available software. Use of the Vega Protocol involves various risks, including but not limited to, losses while digital assets are supplied to the Vega Protocol and losses due to the fluctuation of prices of assets.'
|
||||||
</p>
|
)}
|
||||||
<p className="mb-6">
|
</p>
|
||||||
{t(
|
<p className="mb-6">
|
||||||
'Before using the Vega Protocol, review the relevant documentation at docs.vega.xyz to make sure that you understand how it works. Conduct your own due diligence and consult your financial advisor before making any investment decisions.'
|
{t(
|
||||||
)}
|
'Before using the Vega Protocol, review the relevant documentation at docs.vega.xyz to make sure that you understand how it works. Conduct your own due diligence and consult your financial advisor before making any investment decisions.'
|
||||||
</p>
|
)}
|
||||||
<p className="mb-6">
|
</p>
|
||||||
{t(
|
<p className="mb-6">
|
||||||
'As described in the Vega Protocol core license, the Vega Protocol is provided “as is”, at your own risk, and without warranties of any kind. Although Gobalsky Labs Limited developed much of the initial code for the Vega Protocol, it does not provide or control the Vega Protocol, which is run by third parties deploying it on a bespoke blockchain. Upgrades and modifications to the Vega Protocol are managed in a community-driven way by holders of the VEGA governance token.'
|
{t(
|
||||||
)}
|
'As described in the Vega Protocol core license, the Vega Protocol is provided “as is”, at your own risk, and without warranties of any kind. Although Gobalsky Labs Limited developed much of the initial code for the Vega Protocol, it does not provide or control the Vega Protocol, which is run by third parties deploying it on a bespoke blockchain. Upgrades and modifications to the Vega Protocol are managed in a community-driven way by holders of the VEGA governance token.'
|
||||||
</p>
|
)}
|
||||||
<p className="mb-8">
|
</p>
|
||||||
{t(
|
<p className="mb-8">
|
||||||
'No developer or entity involved in creating the Vega Protocol will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Vega Protocol, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or legal costs, or loss of profits, cryptoassets, tokens or anything else of value.'
|
{t(
|
||||||
)}
|
'No developer or entity involved in creating the Vega Protocol will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Vega Protocol, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or legal costs, or loss of profits, cryptoassets, tokens or anything else of value.'
|
||||||
</p>
|
)}
|
||||||
<p className="mb-8">
|
</p>
|
||||||
{t(
|
<p className="mb-8">
|
||||||
'This website is hosted on a decentralised network, the Interplanetary File System (“IPFS”). The IPFS decentralised web is made up of all the computers (nodes) connected to it. Data is therefore stored on many different computers.'
|
{t(
|
||||||
)}
|
'This website is hosted on a decentralised network, the Interplanetary File System (“IPFS”). The IPFS decentralised web is made up of all the computers (nodes) connected to it. Data is therefore stored on many different computers.'
|
||||||
</p>
|
)}
|
||||||
<p className="mb-8">
|
</p>
|
||||||
{t(
|
<p className="mb-8">
|
||||||
"The information provided on this website does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the website's content as such. No party recommends that any cryptoasset should be bought, sold, or held by you via this website. No party ensures the accuracy of information listed on this website or holds any responsibility for any missing or wrong information. You understand that you are using any and all information available here at your own risk."
|
{t(
|
||||||
)}
|
"The information provided on this website does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the website's content as such. No party recommends that any cryptoasset should be bought, sold, or held by you via this website. No party ensures the accuracy of information listed on this website or holds any responsibility for any missing or wrong information. You understand that you are using any and all information available here at your own risk."
|
||||||
</p>
|
)}
|
||||||
<p className="mb-8">
|
</p>
|
||||||
{t(
|
<p className="mb-8">
|
||||||
'Additionally, just as you can access email protocols such as SMTP through multiple email clients, you can potentially access the Vega Protocol through many web or mobile interfaces. You are responsible for doing your own diligence on those interfaces to understand the associated risks and any fees.'
|
{t(
|
||||||
)}
|
'Additionally, just as you can access email protocols such as SMTP through multiple email clients, you can potentially access the Vega Protocol through many web or mobile interfaces. You are responsible for doing your own diligence on those interfaces to understand the associated risks and any fees.'
|
||||||
</p>
|
)}
|
||||||
</>
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
export { Disclaimer } from './disclaimer';
|
import { Disclaimer } from './disclaimer';
|
||||||
|
|
||||||
|
export default Disclaimer;
|
||||||
|
|||||||
@@ -1,38 +1,43 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { Loader, Splash } from '@vegaprotocol/ui-toolkit';
|
import { marketsWithDataProvider } from '@vegaprotocol/markets';
|
||||||
|
import { useDataProvider } from '@vegaprotocol/data-provider';
|
||||||
|
import { AsyncRenderer } from '@vegaprotocol/ui-toolkit';
|
||||||
|
import { Links, Routes } from '../../pages/client-router';
|
||||||
import { useGlobalStore } from '../../stores';
|
import { useGlobalStore } from '../../stores';
|
||||||
import { useTopTradedMarkets } from '../../lib/hooks/use-top-traded-markets';
|
|
||||||
import { Links } from '../../lib/links';
|
|
||||||
|
|
||||||
// The home pages only purpose is to redirect to the users last market,
|
|
||||||
// the top traded if they are new, or fall back to the list of markets.
|
|
||||||
// Thats why we just render a loader here
|
|
||||||
export const Home = () => {
|
export const Home = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { data } = useTopTradedMarkets();
|
// The default market selected in the platform behind the overlay
|
||||||
|
// should be the oldest market that is currently trading in continuous mode(i.e. not in auction).
|
||||||
|
const { data, error, loading } = useDataProvider({
|
||||||
|
dataProvider: marketsWithDataProvider,
|
||||||
|
variables: undefined,
|
||||||
|
});
|
||||||
|
const update = useGlobalStore((store) => store.update);
|
||||||
const marketId = useGlobalStore((store) => store.marketId);
|
const marketId = useGlobalStore((store) => store.marketId);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (marketId) {
|
if (marketId) {
|
||||||
navigate(Links.MARKET(marketId), {
|
navigate(Links[Routes.MARKET](marketId), {
|
||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
} else if (data) {
|
} else if (data) {
|
||||||
const marketDataId = data[0]?.id;
|
const marketDataId = data[0]?.id;
|
||||||
if (marketDataId) {
|
if (marketDataId) {
|
||||||
navigate(Links.MARKET(marketDataId), {
|
navigate(Links[Routes.MARKET](marketDataId), {
|
||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
navigate(Links.MARKETS());
|
navigate(Links[Routes.MARKETS]());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [marketId, data, navigate]);
|
}, [marketId, data, navigate, update]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Splash>
|
<AsyncRenderer data={data} loading={loading} error={error}>
|
||||||
<Loader />
|
{/* Render a loading and error state but we will redirect if markets are found */}
|
||||||
</Splash>
|
{null}
|
||||||
|
</AsyncRenderer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
export { Home } from './home';
|
import { Home } from './home';
|
||||||
|
|
||||||
|
export default Home;
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
export { Liquidity } from './liquidity';
|
import { Liquidity } from './liquidity';
|
||||||
|
|
||||||
|
export default Liquidity;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user