Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ca6fe3cbf | ||
|
|
4f96472375 | ||
|
|
cddf2ba00b | ||
|
|
d01d6f5815 | ||
|
|
2998e165f6 | ||
|
|
886b0cb6d3 | ||
|
|
6799a06acd | ||
|
|
47a6bcff78 | ||
|
|
06dcd00b53 | ||
|
|
fd7aa5bd78 | ||
|
|
384cfbc70b | ||
|
|
9d14f603b3 |
@@ -11,7 +11,7 @@ on:
|
||||
type: choice
|
||||
options:
|
||||
- explorer-e2e
|
||||
- token-e2e
|
||||
- governance-e2e
|
||||
- trading-e2e
|
||||
tags:
|
||||
description: 'Test tags to run'
|
||||
|
||||
@@ -10,5 +10,5 @@ jobs:
|
||||
uses: ./.github/workflows/cypress-run.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
projects: '["explorer-e2e","token-e2e","trading-e2e"]'
|
||||
projects: '["explorer-e2e","governance-e2e","trading-e2e"]'
|
||||
tags: '@smoke @regression @slow'
|
||||
|
||||
@@ -42,10 +42,10 @@ jobs:
|
||||
affected=$(yarn nx print-affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --select=projects)
|
||||
echo -n "Affected projects: $affected"
|
||||
projects=""
|
||||
if [[ $affected == *"token"* ]]; then projects+='"token-e2e" '; fi
|
||||
if [[ $affected == *"governance"* ]]; then projects+='"governance-e2e" '; fi
|
||||
if [[ $affected == *"trading"* ]]; then projects+='"trading-e2e" '; fi
|
||||
if [[ $affected == *"explorer"* ]]; then projects+='"explorer-e2e" '; fi
|
||||
if [[ -z "$projects" ]]; then projects+='"token-e2e" "trading-e2e" "explorer-e2e" '; fi
|
||||
if [[ -z "$projects" ]]; then projects+='"governance-e2e" "trading-e2e" "explorer-e2e" '; fi
|
||||
projects=${projects%?}
|
||||
projects=[${projects// /,}]
|
||||
echo PROJECTS=$projects >> $GITHUB_ENV
|
||||
|
||||
@@ -12,6 +12,8 @@ on:
|
||||
- react-helpers
|
||||
- tailwindcss-config
|
||||
- types
|
||||
- utils
|
||||
- i18n
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
|
||||
@@ -161,7 +161,7 @@ In order to setup and run vegawallet for e2e capsule tests, in a separate termin
|
||||
bash setup-vegawallet.sh
|
||||
```
|
||||
|
||||
3. copy generated `api-token` and paste the token into `CYPRESS_VEGA_WALLET_API_TOKEN` environment variable in either `apps/token-e2e/.env` or `apps/explorer-e2e/.env` depending on which project needs testing.
|
||||
3. copy generated `api-token` and paste the token into `CYPRESS_VEGA_WALLET_API_TOKEN` environment variable in either `apps/governance-e2e/.env` or `apps/explorer-e2e/.env` depending on which project needs testing.
|
||||
|
||||
Note: The script is only needed if capsule was built for first time or fresh. To run existing wallet service for capsule:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# App configuration variables
|
||||
NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/tm
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.be.devnet1.vega.xyz/websocket
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json
|
||||
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
|
||||
NX_VEGA_ENV=DEVNET
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# App configuration variables
|
||||
NX_TENDERMINT_URL=https://be.explorer.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.explorer.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.explorer.vega.xyz/websocket
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json
|
||||
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
|
||||
NX_VEGA_ENV=MAINNET
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_BLOCK_EXPLORER=https://be.explorer.vega.xyz/rest/
|
||||
NX_ETHERSCAN_URL=https://etherscan.io
|
||||
NX_VEGA_GOVERNANCE_URL=https://token.vega.xyz
|
||||
NX_VEGA_GOVERNANCE_URL=https://token.vega.xyz
|
||||
@@ -1,6 +1,6 @@
|
||||
# App configuration variables
|
||||
NX_TENDERMINT_URL=https://tm.be.mainnet-mirror.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=https://tm.be.mainnet-mirror.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.xyz/websocket
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mirror-network.json
|
||||
NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}'
|
||||
NX_VEGA_ENV=MIRROR
|
||||
|
||||
@@ -7,6 +7,6 @@ NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
|
||||
NX_TENDERMINT_URL=https://tm.sandbox.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.sandbox.vega.xyz/websocket
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.sandbox.vega.xyz/websocket
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_VEGA_GOVERNANCE_URL=https://sandbox.token.vega.xyz
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
NX_TENDERMINT_URL=https://tm.n00.stagnet3.vega.xyz
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.n00.stagnet3.vega.xyz/websocket
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.stagnet3.vega.xyz/websocket
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json
|
||||
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
|
||||
NX_VEGA_ENV=STAGNET3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# App configuration variables
|
||||
NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz
|
||||
NX_BLOCK_EXPLORER=https://be.testnet.vega.xyz/rest
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.be.testnet.vega.xyz/websocket/
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json
|
||||
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
|
||||
NX_VEGA_ENV=TESTNET
|
||||
|
||||
@@ -11,4 +11,4 @@ NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_VEGA_GOVERNANCE_URL=https://validator-testnet.governance.vega.xyz
|
||||
NX_TENDERMINT_URL=https://tm.be.validators-testnet.vega.xyz
|
||||
NX_BLOCK_EXPLORER=https://be.validators-testnet.vega.xyz/rest
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.be.validators-testnet.vega.xyz/websocket/
|
||||
NX_TENDERMINT_WEBSOCKET_URL=wss://be.validators-testnet.vega.xyz/websocket
|
||||
|
||||
@@ -22,29 +22,3 @@ query ExplorerFutureEpoch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# query ExplorerEpoch($id: ID!) {
|
||||
#
|
||||
##### This could be useful for calculating roughly when a future epoch will
|
||||
##### occur, but epoch not exist results in a total error
|
||||
# networkParameter(key: "validators.epoch.length") {
|
||||
# value
|
||||
# }
|
||||
#
|
||||
##### This could be useful for relating where we are in time, but as above
|
||||
##### the total failure caused by epoch(id) not existing
|
||||
##### means this is useful
|
||||
# currentEpoch: epoch {
|
||||
# id
|
||||
# }
|
||||
#
|
||||
# epoch(id: $id) {
|
||||
# id
|
||||
# timestamps {
|
||||
# start
|
||||
# end
|
||||
# firstBlock
|
||||
# lastBlock
|
||||
# }
|
||||
# }
|
||||
#}
|
||||
|
||||
@@ -101,7 +101,7 @@ const DeterministicOrderDetails = ({
|
||||
{t('Remaining')}
|
||||
</h2>
|
||||
<h5 className="text-lg font-medium text-gray-500 mb-0">
|
||||
{o.remaining}
|
||||
<SizeInMarket size={o.remaining} marketId={o.market.id} />
|
||||
</h5>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -19,8 +19,8 @@ module.exports = defineConfig({
|
||||
supportFile: './src/support/index.js',
|
||||
video: false,
|
||||
videoUploadOnPasses: false,
|
||||
videosFolder: '../../dist/cypress/apps/token-e2e/videos',
|
||||
screenshotsFolder: '../../dist/cypress/apps/token-e2e/screenshots',
|
||||
videosFolder: '../../dist/cypress/apps/governance-e2e/videos',
|
||||
screenshotsFolder: '../../dist/cypress/apps/governance-e2e/screenshots',
|
||||
chromeWebSecurity: false,
|
||||
viewportWidth: 1440,
|
||||
viewportHeight: 900,
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# App configuration variables
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json
|
||||
NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql
|
||||
NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}'
|
||||
NX_VEGA_ENV=VALIDATOR_TESTNET
|
||||
@@ -2761,7 +2761,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "86666.297",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "66243.522619730595190252",
|
||||
"locked_amount": "66067.0378744539887664482",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "86666.297",
|
||||
@@ -2827,7 +2827,7 @@
|
||||
"tranche_end": "2023-06-01T00:00:00.000Z",
|
||||
"total_added": "2500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "1263.57600732600725",
|
||||
"locked_amount": "1253.36617953805475",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2500",
|
||||
@@ -2948,7 +2948,7 @@
|
||||
"tranche_end": "2023-09-01T00:00:00.000Z",
|
||||
"total_added": "17500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "17498.8903985507255",
|
||||
"locked_amount": "17428.19843875805275",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "12500",
|
||||
@@ -3214,8 +3214,8 @@
|
||||
"tranche_start": "2023-02-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-08-01T00:00:00.000Z",
|
||||
"total_added": "37500",
|
||||
"total_removed": "3376.096819125",
|
||||
"locked_amount": "31696.477900552485",
|
||||
"total_removed": "3451.5629793",
|
||||
"locked_amount": "31542.48436540822875",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -3239,6 +3239,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x1a73c48a20c37eb5f8214ecb3c1986d0b6a24ae6472533c556ec6c264814abb6"
|
||||
},
|
||||
{
|
||||
"amount": "75.466160175",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x7d9d6e2a37fbe030faf08b7b1b0fc5b09f1f4295c4d7f4e28e0bdac1bdd294ac"
|
||||
},
|
||||
{
|
||||
"amount": "142.173112275",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -3299,6 +3304,12 @@
|
||||
"tranche_id": 34,
|
||||
"tx": "0x1a73c48a20c37eb5f8214ecb3c1986d0b6a24ae6472533c556ec6c264814abb6"
|
||||
},
|
||||
{
|
||||
"amount": "75.466160175",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 34,
|
||||
"tx": "0x7d9d6e2a37fbe030faf08b7b1b0fc5b09f1f4295c4d7f4e28e0bdac1bdd294ac"
|
||||
},
|
||||
{
|
||||
"amount": "142.173112275",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -3337,8 +3348,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "1100.983636425",
|
||||
"remaining_tokens": "6399.016363575"
|
||||
"withdrawn_tokens": "1176.4497966",
|
||||
"remaining_tokens": "6323.5502034"
|
||||
},
|
||||
{
|
||||
"address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600",
|
||||
@@ -3370,7 +3381,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "66183.0837404197105596",
|
||||
"locked_amount": "66006.760015267000693995",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@@ -3436,7 +3447,7 @@
|
||||
"tranche_end": "2023-09-03T00:00:00.000Z",
|
||||
"total_added": "62600",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "31898.27305936073208",
|
||||
"locked_amount": "31770.79622653475404",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10000",
|
||||
@@ -3629,7 +3640,7 @@
|
||||
"tranche_end": "2023-09-17T00:00:00.000Z",
|
||||
"total_added": "5000",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "2739.566210045662",
|
||||
"locked_amount": "2729.3843543886355",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "5000",
|
||||
@@ -3840,7 +3851,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "97499.58",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "8141.6415391408092444606",
|
||||
"locked_amount": "7968.6843900639785516424",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "97499.58",
|
||||
@@ -3873,7 +3884,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "135173.4239508",
|
||||
"total_removed": "98230.390980249184455396",
|
||||
"locked_amount": "11128.218388231931879326063704",
|
||||
"locked_amount": "10891.815825250007847523299096",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "135173.4239508",
|
||||
@@ -3919,7 +3930,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "32499.86",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "3425.0479968875506615442",
|
||||
"locked_amount": "3352.287911081129354365",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "32499.86",
|
||||
@@ -3952,7 +3963,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "10833.29",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "1114.8198871078435790832",
|
||||
"locked_amount": "1091.137185225013668482",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10833.29",
|
||||
@@ -3985,7 +3996,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "22749.93",
|
||||
"total_removed": "4720.860935375",
|
||||
"locked_amount": "4167.4457285340302852478",
|
||||
"locked_amount": "4078.914499460078704314",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "6500",
|
||||
@@ -4136,8 +4147,8 @@
|
||||
"tranche_start": "2022-11-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-01T00:00:00.000Z",
|
||||
"total_added": "22500",
|
||||
"total_removed": "4913.13257745",
|
||||
"locked_amount": "7581.4226519337009",
|
||||
"total_removed": "4988.60449275",
|
||||
"locked_amount": "7489.02653084714535",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -4161,6 +4172,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xe5b0236fdb114d861139db0bdec5bdc26b4e107ff73eb66bc4ba262a003fd872"
|
||||
},
|
||||
{
|
||||
"amount": "75.4719153",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x27d0868963dc1e725d9b4da891a4df20b48107f1b0c803dd3f752362aa1d4335"
|
||||
},
|
||||
{
|
||||
"amount": "142.17311235",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -4276,6 +4292,12 @@
|
||||
"tranche_id": 33,
|
||||
"tx": "0xe5b0236fdb114d861139db0bdec5bdc26b4e107ff73eb66bc4ba262a003fd872"
|
||||
},
|
||||
{
|
||||
"amount": "75.4719153",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 33,
|
||||
"tx": "0x27d0868963dc1e725d9b4da891a4df20b48107f1b0c803dd3f752362aa1d4335"
|
||||
},
|
||||
{
|
||||
"amount": "142.17311235",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -4386,8 +4408,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "4913.13257745",
|
||||
"remaining_tokens": "2586.86742255"
|
||||
"withdrawn_tokens": "4988.60449275",
|
||||
"remaining_tokens": "2511.39550725"
|
||||
},
|
||||
{
|
||||
"address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1",
|
||||
@@ -4412,7 +4434,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "928642.9598472029154",
|
||||
"locked_amount": "494221.11463625557046169",
|
||||
"locked_amount": "490270.700486229719709276",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@@ -36791,8 +36813,8 @@
|
||||
"tranche_start": "2022-03-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "615950.831401702010493",
|
||||
"locked_amount": "783947.108408790236382843098",
|
||||
"total_removed": "618385.665327542135993",
|
||||
"locked_amount": "777876.602721610569750322568",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@@ -36961,6 +36983,11 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "2434.8339258401255",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
"tx": "0xcba878ae28c2c84219f8281dc2a57d0d9b6c99b7920900d5344c76aabe8f1e84"
|
||||
},
|
||||
{
|
||||
"amount": "16659.576193025747093",
|
||||
"user": "0xB523235B6c7C74DDB26b10E78bFb2d0Cb63Ae289",
|
||||
@@ -37335,6 +37362,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "2434.8339258401255",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
"tranche_id": 1,
|
||||
"tx": "0xcba878ae28c2c84219f8281dc2a57d0d9b6c99b7920900d5344c76aabe8f1e84"
|
||||
},
|
||||
{
|
||||
"amount": "6293.20485405503",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
@@ -37619,8 +37652,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "187637.95",
|
||||
"withdrawn_tokens": "146054.503703913043",
|
||||
"remaining_tokens": "41583.446296086957"
|
||||
"withdrawn_tokens": "148489.3376297531685",
|
||||
"remaining_tokens": "39148.6123702468315"
|
||||
},
|
||||
{
|
||||
"address": "0x1A71e3ED1996CAbB91bB043f880CE963D601707e",
|
||||
@@ -38140,8 +38173,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15870102.715470999700000001",
|
||||
"total_removed": "584996.67274505202169452",
|
||||
"locked_amount": "8079513.697843178693280892781044398053528",
|
||||
"total_removed": "585576.10171211141869452",
|
||||
"locked_amount": "8057988.074440156474389167629569634847256",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@@ -38680,6 +38713,16 @@
|
||||
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
|
||||
"tx": "0x3c76f03b71481a44c6ba2c7cea407f5f1bac60bcaa9242af18de287f94c8ed90"
|
||||
},
|
||||
{
|
||||
"amount": "445.6540155068705",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xb54d54fd5a6211e97495020ad17e9f045d032999ed94ea31994958304010aa85"
|
||||
},
|
||||
{
|
||||
"amount": "133.7749515525265",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
"tx": "0xed77ed534414a1949b1473707782223907e0ac001f899037ff822f10bd4a358a"
|
||||
},
|
||||
{
|
||||
"amount": "535.4042378778335",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -40467,6 +40510,12 @@
|
||||
"tranche_id": 2,
|
||||
"tx": "0x1438fbbc780cb382033855d295fa2511deed15cd64506a62ae4e3cfe82b3678e"
|
||||
},
|
||||
{
|
||||
"amount": "445.6540155068705",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xb54d54fd5a6211e97495020ad17e9f045d032999ed94ea31994958304010aa85"
|
||||
},
|
||||
{
|
||||
"amount": "535.4042378778335",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -41681,8 +41730,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "259998.8875",
|
||||
"withdrawn_tokens": "127367.16038718373625",
|
||||
"remaining_tokens": "132631.72711281626375"
|
||||
"withdrawn_tokens": "127812.81440269060675",
|
||||
"remaining_tokens": "132186.07309730939325"
|
||||
},
|
||||
{
|
||||
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
|
||||
@@ -43039,6 +43088,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "133.7749515525265",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xed77ed534414a1949b1473707782223907e0ac001f899037ff822f10bd4a358a"
|
||||
},
|
||||
{
|
||||
"amount": "345.7620519411935",
|
||||
"user": "0xE6CacAE56Cca8dFdB7910b5A13578719D4E57DA0",
|
||||
@@ -43305,8 +43360,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "12362.05",
|
||||
"withdrawn_tokens": "5949.173638923777",
|
||||
"remaining_tokens": "6412.876361076223"
|
||||
"withdrawn_tokens": "6082.9485904763035",
|
||||
"remaining_tokens": "6279.1014095236965"
|
||||
},
|
||||
{
|
||||
"address": "0xb091D456d0dFCB94dcba6f355379056C5bb995fC",
|
||||
@@ -43937,8 +43992,8 @@
|
||||
"tranche_start": "2021-11-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-05T00:00:00.000Z",
|
||||
"total_added": "14597706.0446472999",
|
||||
"total_removed": "5577113.077460725181649906",
|
||||
"locked_amount": "1737510.231376472448763806568635843",
|
||||
"total_removed": "5577730.800522677126225156",
|
||||
"locked_amount": "1717637.913293206087167300482305332",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129284.449",
|
||||
@@ -44167,6 +44222,11 @@
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0x904f971f68cc70ba987688b8b26bcbd4e16ab1964b095de013e364f3ae7530c6"
|
||||
},
|
||||
{
|
||||
"amount": "617.72306195194457525",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0xcc545119eac3fe838555697dae55ce68273cb4c5f414c8983bac9f7ef8338f2c"
|
||||
},
|
||||
{
|
||||
"amount": "800.792718381487871",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -47146,6 +47206,12 @@
|
||||
"tranche_id": 3,
|
||||
"tx": "0x904f971f68cc70ba987688b8b26bcbd4e16ab1964b095de013e364f3ae7530c6"
|
||||
},
|
||||
{
|
||||
"amount": "617.72306195194457525",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0xcc545119eac3fe838555697dae55ce68273cb4c5f414c8983bac9f7ef8338f2c"
|
||||
},
|
||||
{
|
||||
"amount": "800.792718381487871",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -49662,8 +49728,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "359123.469575",
|
||||
"withdrawn_tokens": "316010.1011302183066365",
|
||||
"remaining_tokens": "43113.3684447816933635"
|
||||
"withdrawn_tokens": "316627.82419217025121175",
|
||||
"remaining_tokens": "42495.64538282974878825"
|
||||
},
|
||||
{
|
||||
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
|
||||
@@ -51007,7 +51073,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "5778205.3912159303",
|
||||
"total_removed": "3077573.36197477479025324",
|
||||
"locked_amount": "369597.397251054113600109778074383",
|
||||
"locked_amount": "361745.724189576549364124598838149",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "552496.6455",
|
||||
@@ -53079,7 +53145,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "34992.4553336210685",
|
||||
"locked_amount": "124220.90056009124187109393607304",
|
||||
"locked_amount": "123258.994233467654924929872552024",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json
|
||||
NX_VEGA_ENV=VALIDATOR_TESTNET
|
||||
NX_VEGA_EXPLORER_URL=https://dev.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}'
|
||||
NX_VEGA_TOKEN_URL=https://token.fairground.wtf
|
||||
NX_VEGA_EXPLORER_URL=https://validator-testnet.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"STAGNET3\":\"https://stagnet3.console.vega.xyz\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\"}
|
||||
NX_VEGA_TOKEN_URL=https://validator-testnet.governance.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
.pre-loader {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.loader-item {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: black;
|
||||
}
|
||||
.pre-loader-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.pre-loader-wrapper {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@for $i from 0 through 16 {
|
||||
.loader-item:nth-child(#{$i}) {
|
||||
@if $i % 2 == 0 {
|
||||
animation-delay: #{$i * 50 * random(5)}ms;
|
||||
animation-direction: reverse;
|
||||
} @else {
|
||||
animation-delay: #{$i * -50 * random(5)}ms;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
}
|
||||
}
|
||||
.loader-item {
|
||||
animation: flickering 0.4s linear alternate infinite;
|
||||
}
|
||||
@keyframes flickering {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
25% {
|
||||
opacity: 1;
|
||||
}
|
||||
26% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
html.dark {
|
||||
.pre-loader {
|
||||
.loader-item {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Tooltip } from '@vegaprotocol/ui-toolkit';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useMemo } from 'react';
|
||||
import type { OrderSubmissionBody } from '@vegaprotocol/wallet';
|
||||
import type { Market, MarketData } from '@vegaprotocol/market-list';
|
||||
import {
|
||||
@@ -26,7 +27,7 @@ export const DealTicketFeeDetails = ({
|
||||
marketData,
|
||||
}: DealTicketFeeDetailsProps) => {
|
||||
const feeDetails = useFeeDealTicketDetails(order, market, marketData);
|
||||
const details = getFeeDetailsValues(feeDetails);
|
||||
const details = useMemo(() => getFeeDetailsValues(feeDetails), [feeDetails]);
|
||||
return (
|
||||
<div>
|
||||
{details.map(({ label, value, labelDescription, symbol }) => (
|
||||
|
||||
@@ -36,6 +36,7 @@ import {
|
||||
usePersistedOrderStore,
|
||||
usePersistedOrderStoreSubscription,
|
||||
} from '@vegaprotocol/orders';
|
||||
import { OrderType } from '@vegaprotocol/types';
|
||||
|
||||
export type TransactionStatus = 'default' | 'pending';
|
||||
|
||||
@@ -82,7 +83,12 @@ export const DealTicket = ({
|
||||
const order = watch();
|
||||
|
||||
watch((orderData) => {
|
||||
setPersistedOrder(orderData as DealTicketFormFields);
|
||||
const persistable = !(
|
||||
orderData.type === OrderType.TYPE_LIMIT && orderData.price === ''
|
||||
);
|
||||
if (persistable) {
|
||||
setPersistedOrder(orderData as DealTicketFormFields);
|
||||
}
|
||||
});
|
||||
|
||||
usePersistedOrderStoreSubscription(market.id, (storedOrder) => {
|
||||
@@ -369,7 +375,7 @@ const SummaryMessage = memo(
|
||||
if (balanceError) {
|
||||
return (
|
||||
<div className="mb-2">
|
||||
<MarginWarning balance={balance} margin={margin} asset={asset} />;
|
||||
<MarginWarning balance={balance} margin={margin} asset={asset} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,11 @@ import {
|
||||
normalizeOrderAmendment,
|
||||
useVegaTransactionStore,
|
||||
} from '@vegaprotocol/wallet';
|
||||
import type { VegaTxState, TransactionResult } from '@vegaprotocol/wallet';
|
||||
import type {
|
||||
VegaTxState,
|
||||
TransactionResult,
|
||||
OrderTxUpdateFieldsFragment,
|
||||
} from '@vegaprotocol/wallet';
|
||||
import { OrderEditDialog } from '../order-list/order-edit-dialog';
|
||||
import type { OrderSubFieldsFragment } from '../../order-hooks';
|
||||
import * as Schema from '@vegaprotocol/types';
|
||||
@@ -203,7 +207,19 @@ export const OrderListManager = ({
|
||||
fields.limitPrice,
|
||||
fields.size
|
||||
);
|
||||
create({ orderAmendment });
|
||||
const originalOrder: OrderTxUpdateFieldsFragment = {
|
||||
type: editOrder.type,
|
||||
id: editOrder.id,
|
||||
status: editOrder.status,
|
||||
createdAt: editOrder.createdAt,
|
||||
size: editOrder.size,
|
||||
price: editOrder.price,
|
||||
timeInForce: editOrder.timeInForce,
|
||||
expiresAt: editOrder.expiresAt,
|
||||
side: editOrder.side,
|
||||
marketId: editOrder.market.id,
|
||||
};
|
||||
create({ orderAmendment }, originalOrder);
|
||||
setEditOrder(null);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -82,7 +82,7 @@ export const Notification = ({
|
||||
{title}
|
||||
</div>
|
||||
)}
|
||||
<div className="text-sm">{message}</div>
|
||||
<div className="text-sm [word-break:break-word]">{message}</div>
|
||||
{buttonProps && (
|
||||
<Button
|
||||
size={buttonProps.size || 'sm'}
|
||||
|
||||
@@ -2,9 +2,16 @@ import { useVegaTransactionStore } from './use-vega-transaction-store';
|
||||
import { VegaTxStatus } from './use-vega-transaction';
|
||||
import type { VegaStoredTxState } from './use-vega-transaction-store';
|
||||
import type {
|
||||
OrderAmendmentBody,
|
||||
OrderCancellationBody,
|
||||
WithdrawSubmissionBody,
|
||||
} from './connectors/vega-connector';
|
||||
import {
|
||||
OrderStatus,
|
||||
OrderTimeInForce,
|
||||
OrderType,
|
||||
Side,
|
||||
} from '@vegaprotocol/types';
|
||||
|
||||
jest.mock('./utils', () => ({
|
||||
...jest.requireActual('./utils'),
|
||||
@@ -24,6 +31,33 @@ describe('useVegaTransactionStore', () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const orderAmendment: OrderAmendmentBody = {
|
||||
orderAmendment: {
|
||||
orderId:
|
||||
'6a4fcd0ba478df2f284ef5f6d3c64a478cb8043d3afe36f66f92c0ed92631e64',
|
||||
marketId:
|
||||
'3aa2a828687cc3d59e92445d294891cbbd40e2165bbfb15674158ef5d4e8848d',
|
||||
price: '1122',
|
||||
timeInForce: OrderTimeInForce.TIME_IN_FORCE_GTC,
|
||||
sizeDelta: 0,
|
||||
},
|
||||
};
|
||||
|
||||
const originalOrder = {
|
||||
type: OrderType.TYPE_LIMIT,
|
||||
id: '6902dea1fa01f0b98cceb382cb9c95df244747fa27ba591de084cdd876d2f7c2',
|
||||
status: OrderStatus.STATUS_ACTIVE,
|
||||
createdAt: '2023-03-01T14:08:13.48478Z',
|
||||
size: '12',
|
||||
price: '1125',
|
||||
timeInForce: OrderTimeInForce.TIME_IN_FORCE_GTC,
|
||||
expiresAt: null,
|
||||
side: Side.SIDE_BUY,
|
||||
marketId:
|
||||
'3aa2a828687cc3d59e92445d294891cbbd40e2165bbfb15674158ef5d4e8848d',
|
||||
};
|
||||
|
||||
const processedTransactionUpdate = {
|
||||
status: VegaTxStatus.Pending,
|
||||
txHash: 'txHash',
|
||||
@@ -63,6 +97,45 @@ describe('useVegaTransactionStore', () => {
|
||||
VegaTxStatus.Requested,
|
||||
]);
|
||||
});
|
||||
|
||||
it('updates an order with order amendment', () => {
|
||||
useVegaTransactionStore.getState().create(orderAmendment, originalOrder);
|
||||
useVegaTransactionStore.getState().create(orderAmendment, originalOrder);
|
||||
useVegaTransactionStore.getState().create(orderAmendment, originalOrder);
|
||||
const transaction = useVegaTransactionStore.getState().transactions[1];
|
||||
useVegaTransactionStore
|
||||
.getState()
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
.update(transaction!.id, { status: VegaTxStatus.Pending });
|
||||
expect(
|
||||
useVegaTransactionStore.getState().transactions.map((t) => t?.status)
|
||||
).toEqual([
|
||||
VegaTxStatus.Requested,
|
||||
VegaTxStatus.Pending,
|
||||
VegaTxStatus.Requested,
|
||||
]);
|
||||
expect(
|
||||
useVegaTransactionStore
|
||||
.getState()
|
||||
.transactions.map((t) => t?.order?.price)
|
||||
).toEqual(['1125', '1125', '1125']);
|
||||
|
||||
const result = {
|
||||
orderAmendment: {
|
||||
marketId:
|
||||
'3aa2a828687cc3d59e92445d294891cbbd40e2165bbfb15674158ef5d4e8848d',
|
||||
orderId:
|
||||
'6a4fcd0ba478df2f284ef5f6d3c64a478cb8043d3afe36f66f92c0ed92631e64',
|
||||
price: '1122',
|
||||
sizeDelta: 0,
|
||||
timeInForce: OrderTimeInForce.TIME_IN_FORCE_GTC,
|
||||
},
|
||||
};
|
||||
expect(
|
||||
useVegaTransactionStore.getState().transactions.map((t) => t?.body)
|
||||
).toStrictEqual([result, result, result]);
|
||||
});
|
||||
|
||||
it('sets dialogOpen to false on dismiss', () => {
|
||||
useVegaTransactionStore.getState().create(orderCancellation);
|
||||
useVegaTransactionStore.getState().dismiss(0);
|
||||
@@ -70,6 +143,7 @@ describe('useVegaTransactionStore', () => {
|
||||
useVegaTransactionStore.getState().transactions[0]?.dialogOpen
|
||||
).toEqual(false);
|
||||
});
|
||||
|
||||
it('updates transaction result', () => {
|
||||
useVegaTransactionStore.getState().create(withdrawSubmission);
|
||||
useVegaTransactionStore.getState().update(0, processedTransactionUpdate);
|
||||
@@ -80,6 +154,7 @@ describe('useVegaTransactionStore', () => {
|
||||
useVegaTransactionStore.getState().transactions[0]?.transactionResult
|
||||
).toEqual(transactionResult);
|
||||
});
|
||||
|
||||
it('updates withdrawal', () => {
|
||||
useVegaTransactionStore.getState().create(withdrawSubmission);
|
||||
useVegaTransactionStore.getState().update(0, processedTransactionUpdate);
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface VegaStoredTxState extends VegaTxState {
|
||||
}
|
||||
export interface VegaTransactionStore {
|
||||
transactions: (VegaStoredTxState | undefined)[];
|
||||
create: (tx: Transaction) => number;
|
||||
create: (tx: Transaction, order?: OrderTxUpdateFieldsFragment) => number;
|
||||
update: (
|
||||
index: number,
|
||||
update: Partial<
|
||||
@@ -55,7 +55,7 @@ export interface VegaTransactionStore {
|
||||
export const useVegaTransactionStore = create(
|
||||
subscribeWithSelector<VegaTransactionStore>((set, get) => ({
|
||||
transactions: [] as VegaStoredTxState[],
|
||||
create: (body: Transaction) => {
|
||||
create: (body: Transaction, order?: OrderTxUpdateFieldsFragment) => {
|
||||
const transactions = get().transactions;
|
||||
const now = new Date();
|
||||
const transaction: VegaStoredTxState = {
|
||||
@@ -68,6 +68,7 @@ export const useVegaTransactionStore = create(
|
||||
signature: null,
|
||||
status: VegaTxStatus.Requested,
|
||||
dialogOpen: true,
|
||||
order,
|
||||
};
|
||||
set({ transactions: transactions.concat(transaction) });
|
||||
return transaction.id;
|
||||
@@ -165,7 +166,11 @@ export const useVegaTransactionStore = create(
|
||||
// TODO: handle multiple orders from batch market instructions
|
||||
// Note: If multiple orders are submitted the first order ID is determined by hashing the signature of the transaction
|
||||
// (see determineId function). For each subsequent order's ID, a hash of the previous orders ID is used
|
||||
transaction.order = order;
|
||||
transaction.order =
|
||||
isOrderAmendmentTransaction(transaction?.body) &&
|
||||
transaction.order
|
||||
? transaction.order // the transaction.order would be the original order amended
|
||||
: order;
|
||||
transaction.status = VegaTxStatus.Complete;
|
||||
transaction.dialogOpen = true;
|
||||
transaction.updatedAt = new Date();
|
||||
|
||||
Reference in New Issue
Block a user