Compare commits
36
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a452a4cad3 | ||
|
|
32e87d75a0 | ||
|
|
a1366e59ec | ||
|
|
0b035d5064 | ||
|
|
8539343f9a | ||
|
|
e1a38f2197 | ||
|
|
8201e87050 | ||
|
|
3aaf4e724d | ||
|
|
6fe06e9f62 | ||
|
|
cd8b0e7caf | ||
|
|
4282faa9d9 | ||
|
|
a24846fd06 | ||
|
|
72de53cf10 | ||
|
|
f3c0313a59 | ||
|
|
4c0de8f22b | ||
|
|
40e8942011 | ||
|
|
254fb57af0 | ||
|
|
6371199537 | ||
|
|
75cb48a4b9 | ||
|
|
933878acf5 | ||
|
|
2a884ac95a | ||
|
|
15a7fe8cff | ||
|
|
5995df8e68 | ||
|
|
4d5b7cf5e7 | ||
|
|
b616aee978 | ||
|
|
e1f60446f0 | ||
|
|
7f271069ab | ||
|
|
1ae7af5d59 | ||
|
|
b9c5d9ee96 | ||
|
|
ae1768a669 | ||
|
|
a1bfe7f1a7 | ||
|
|
9b975157cc | ||
|
|
78a88cbb90 | ||
|
|
d2c3c263a0 | ||
|
|
b3cce4b9e9 | ||
|
|
3a5f03ac55 |
@@ -91,5 +91,7 @@ jobs:
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: logs-${{ matrix.project }}
|
||||
path: /home/runner/.vegacapsule/testnet/logs
|
||||
name: test-report-and-logs-${{ matrix.project }}
|
||||
path: |
|
||||
/home/runner/.vegacapsule/testnet/logs
|
||||
frontend-monorepo/apps/trading-e2e/cypress/reports
|
||||
|
||||
@@ -46,3 +46,6 @@ cypress.env.json
|
||||
|
||||
# Next.js
|
||||
.next
|
||||
|
||||
#cypress
|
||||
/apps/trading-e2e/cypress/reports/
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
export const upgradeProposalsData = {
|
||||
lastBlockHeight: '2014133',
|
||||
protocolUpgradeProposals: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
upgradeBlockHeight: '2015942',
|
||||
vegaReleaseTag: 'v1',
|
||||
approvers: [
|
||||
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
||||
'121934387281812a2d5e6913e5d57c0f85a8f169e2752347ee2e23b52d46623c',
|
||||
'65c80e2f5f84e2109eec30810f137ba04cbbecaba8f27706c146cc6c6f90db29',
|
||||
'bd6339d2428c79ac3bc9011771236d17bac92bcb1806423388d52fb440043aef',
|
||||
],
|
||||
status: 'PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED',
|
||||
__typename: 'ProtocolUpgradeProposal',
|
||||
},
|
||||
__typename: 'ProtocolUpgradeProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
upgradeBlockHeight: '1955065',
|
||||
vegaReleaseTag: 'v0.71.0+dev-12156-bca1d57e',
|
||||
approvers: [
|
||||
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
||||
'121934387281812a2d5e6913e5d57c0f85a8f169e2752347ee2e23b52d46623c',
|
||||
'65c80e2f5f84e2109eec30810f137ba04cbbecaba8f27706c146cc6c6f90db29',
|
||||
'bd6339d2428c79ac3bc9011771236d17bac92bcb1806423388d52fb440043aef',
|
||||
],
|
||||
status: 'PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED',
|
||||
__typename: 'ProtocolUpgradeProposal',
|
||||
},
|
||||
__typename: 'ProtocolUpgradeProposalEdge',
|
||||
},
|
||||
],
|
||||
__typename: 'ProtocolUpgradeProposalConnection',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,117 @@
|
||||
export const nodeData = {
|
||||
epoch: {
|
||||
id: '204731',
|
||||
timestamps: {
|
||||
start: '2023-04-14T09:30:09.452005Z',
|
||||
end: null,
|
||||
expiry: '2023-04-14T09:31:09.452005Z',
|
||||
__typename: 'EpochTimestamps',
|
||||
},
|
||||
__typename: 'Epoch',
|
||||
},
|
||||
nodesConnection: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
avatarUrl:
|
||||
'https://www.gravatar.com/avatar/y2hwc4xjds7zvlam3y4in94q2rcdimsn?d=identicon',
|
||||
id: 'f337b5cc50c49a928e49129a2eca62277a81b4b7336b6e4131f8f0431e8db029',
|
||||
name: 'lovely-fisherman',
|
||||
pubkey:
|
||||
'02a6531716b7a6d82779b7793c3ad2fcb47290ea2ff0912c56f61219bd9675ff',
|
||||
stakedByOperator: '3000000000000000000000',
|
||||
stakedByDelegates: '0',
|
||||
stakedTotal: '3000000000000000000000',
|
||||
pendingStake: '0',
|
||||
rankingScore: {
|
||||
rankingScore: '0.4999166805532412',
|
||||
stakeScore: '0.2499583402766206',
|
||||
performanceScore: '1',
|
||||
votingPower: '2499',
|
||||
status: 'VALIDATOR_NODE_STATUS_TENDERMINT',
|
||||
__typename: 'RankingScore',
|
||||
},
|
||||
__typename: 'Node',
|
||||
},
|
||||
__typename: 'NodeEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
avatarUrl:
|
||||
'https://www.gravatar.com/avatar/g1tw70qnoo0tf8ror30jefwhae92zy16?d=identicon',
|
||||
id: 'cdadcf885556e372b6b39679d6ad46854d1d9c1e982da7ff2929544df01f9088',
|
||||
name: 'magnificent-door',
|
||||
pubkey:
|
||||
'121934387281812a2d5e6913e5d57c0f85a8f169e2752347ee2e23b52d46623c',
|
||||
stakedByOperator: '3000000000000000000000',
|
||||
stakedByDelegates: '0',
|
||||
stakedTotal: '3000000000000000000000',
|
||||
pendingStake: '0',
|
||||
rankingScore: {
|
||||
rankingScore: '0.4999166805532412',
|
||||
stakeScore: '0.2499583402766206',
|
||||
performanceScore: '1',
|
||||
votingPower: '2499',
|
||||
status: 'VALIDATOR_NODE_STATUS_TENDERMINT',
|
||||
__typename: 'RankingScore',
|
||||
},
|
||||
__typename: 'Node',
|
||||
},
|
||||
__typename: 'NodeEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
avatarUrl:
|
||||
'https://www.gravatar.com/avatar/s2e7hp7soq5zdhxeap7p21onetsjiy6w?d=identicon',
|
||||
id: '9a13de2548fef30d928e71e76004c98ec7ad9d8fc3ddcd16ddee210b28ea4cfc',
|
||||
name: 'helpful-tree',
|
||||
pubkey:
|
||||
'bd6339d2428c79ac3bc9011771236d17bac92bcb1806423388d52fb440043aef',
|
||||
stakedByOperator: '3000000000000000000000',
|
||||
stakedByDelegates: '2000000000000000000',
|
||||
stakedTotal: '3002000000000000000000',
|
||||
pendingStake: '0',
|
||||
rankingScore: {
|
||||
rankingScore: '0.5002499583402766',
|
||||
stakeScore: '0.2501249791701383',
|
||||
performanceScore: '1',
|
||||
votingPower: '2501',
|
||||
status: 'VALIDATOR_NODE_STATUS_TENDERMINT',
|
||||
__typename: 'RankingScore',
|
||||
},
|
||||
__typename: 'Node',
|
||||
},
|
||||
__typename: 'NodeEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
avatarUrl:
|
||||
'https://www.gravatar.com/avatar/3gop683kg2cvd8rpv286hzagqt3yjsdq?d=identicon',
|
||||
id: '93ac271ab95038333587e47d11461e6edc0126e6e77156281c545f4c5650a6d0',
|
||||
name: 'easy-cookie',
|
||||
pubkey:
|
||||
'65c80e2f5f84e2109eec30810f137ba04cbbecaba8f27706c146cc6c6f90db29',
|
||||
stakedByOperator: '3000000000000000000000',
|
||||
stakedByDelegates: '0',
|
||||
stakedTotal: '3000000000000000000000',
|
||||
pendingStake: '0',
|
||||
rankingScore: {
|
||||
rankingScore: '0.4999166805532412',
|
||||
stakeScore: '0.2499583402766206',
|
||||
performanceScore: '1',
|
||||
votingPower: '2499',
|
||||
status: 'VALIDATOR_NODE_STATUS_TENDERMINT',
|
||||
__typename: 'RankingScore',
|
||||
},
|
||||
__typename: 'Node',
|
||||
},
|
||||
__typename: 'NodeEdge',
|
||||
},
|
||||
],
|
||||
__typename: 'NodesConnection',
|
||||
},
|
||||
nodeData: {
|
||||
stakedTotal: '12002000000000000000000',
|
||||
__typename: 'NodeData',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,325 @@
|
||||
export const proposalsData = {
|
||||
proposalsConnection: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
id: 'e8ba9d268e12514644fd1fc7ff289292f4ce6489cc32cc73133aea52c04aef89',
|
||||
rationale: {
|
||||
title: 'Add asset Wrapped Ether',
|
||||
description: 'Proposal to add asset WETH to Vega network',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: '',
|
||||
state: 'STATE_OPEN',
|
||||
datetime: '2026-12-01T11:41:28.654288Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2026-12-01T11:45:33Z',
|
||||
enactmentDatetime: '2026-12-01T11:45:43Z',
|
||||
change: {
|
||||
name: 'Wrapped Ether',
|
||||
symbol: 'WETH',
|
||||
decimals: 18,
|
||||
quantum: '0.0008',
|
||||
source: {
|
||||
contractAddress: '0x9B18C6CaD886D5653783E2B25759124760F4407F',
|
||||
withdrawThreshold: '1',
|
||||
lifetimeLimit: '400000000000000000',
|
||||
__typename: 'ERC20',
|
||||
},
|
||||
__typename: 'NewAsset',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
id: 'd848fc7881f13d366df5f61ab139d5fcfa72bf838151bb51b54381870e357931',
|
||||
rationale: {
|
||||
title: 'Add asset Dai Stablecoin',
|
||||
description: 'Proposal to add asset DAI to Vega network',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: '',
|
||||
state: 'STATE_ENACTED',
|
||||
datetime: '2022-11-29T15:49:57.80978Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2023-04-13T15:52:58Z',
|
||||
enactmentDatetime: '2023-04-13T15:53:08Z',
|
||||
change: {
|
||||
name: 'Dai Stablecoin',
|
||||
symbol: 'DAI',
|
||||
decimals: 18,
|
||||
quantum: '1',
|
||||
source: {
|
||||
contractAddress: '0xad018fB8ec00bfd622B91C83E684a6AC7bB8fbA4',
|
||||
withdrawThreshold: '1',
|
||||
lifetimeLimit: '500000000000000000000',
|
||||
__typename: 'ERC20',
|
||||
},
|
||||
__typename: 'NewAsset',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
id: 'ccbd651b4a1167fd73c4a0340ac759fa0a31ca487ad46a13254b741ad71947ed',
|
||||
rationale: {
|
||||
title: 'New DAI market',
|
||||
description: 'New DAI market',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: '0VFQusmmESdrP5GuL8naB6lxfoE3RPGaEeo7abdN',
|
||||
state: 'STATE_ENACTED',
|
||||
datetime: '2022-11-26T19:36:19.26034Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2022-11-26T19:36:42Z',
|
||||
enactmentDatetime: '2023-03-22T13:57:37Z',
|
||||
change: {
|
||||
instrument: {
|
||||
name: 'UNIDAI Monthly (Dec 2022)',
|
||||
code: 'UNIDAI.MF21',
|
||||
futureProduct: {
|
||||
settlementAsset: { symbol: 'tDAI', __typename: 'Asset' },
|
||||
__typename: 'FutureProduct',
|
||||
},
|
||||
__typename: 'InstrumentConfiguration',
|
||||
},
|
||||
__typename: 'NewMarket',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
id: 'bc70383f0e9515b15542cf4c63590cd2ca46b3363ba7c4a72af0e62112b3951b',
|
||||
rationale: {
|
||||
title: 'USDC-III',
|
||||
description: 'USDC-III D List test',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: '',
|
||||
state: 'STATE_ENACTED',
|
||||
datetime: '2022-11-22T15:17:28.829605Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2022-11-22T15:18:56Z',
|
||||
enactmentDatetime: '2022-11-22T15:19:06Z',
|
||||
change: {
|
||||
name: 'USDC-III',
|
||||
symbol: 'USDC-III',
|
||||
decimals: 18,
|
||||
quantum: '1',
|
||||
source: {
|
||||
contractAddress: '0x1F1A067aEC530b66BA5128C9Db76825eC22c3C6b',
|
||||
withdrawThreshold: '100000000000000000000000000',
|
||||
lifetimeLimit: '1000000000000000000000000000',
|
||||
__typename: 'ERC20',
|
||||
},
|
||||
__typename: 'NewAsset',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
id: '9d9b2a9d0179d0e4ccb317f6c4a5db0b905d893190bfb5e5499985ef313281c8',
|
||||
rationale: {
|
||||
title: 'New BTC market',
|
||||
description: 'New BTC market',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: 'AXeRWS3TvLBFDgWOSHQpKFJf3NTbnWK6310q02fZ',
|
||||
state: 'STATE_ENACTED',
|
||||
datetime: '2022-11-26T19:36:19.26034Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2022-11-26T19:36:42Z',
|
||||
enactmentDatetime: '2023-03-22T13:57:37Z',
|
||||
change: {
|
||||
instrument: {
|
||||
name: 'ETHBTC Quarterly (Feb 2023)',
|
||||
code: 'ETHBTC.QM21',
|
||||
futureProduct: {
|
||||
settlementAsset: { symbol: 'tBTC', __typename: 'Asset' },
|
||||
__typename: 'FutureProduct',
|
||||
},
|
||||
__typename: 'InstrumentConfiguration',
|
||||
},
|
||||
__typename: 'NewMarket',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
{
|
||||
node: {
|
||||
id: '9c48796e7988769ededc2b2b02220b00e93f65f23e8141bf1fd23a6983d95943',
|
||||
rationale: {
|
||||
title: 'Update governance.proposal.asset.requiredMajority',
|
||||
description:
|
||||
'Proposal to update governance.proposal.asset.requiredMajority to 300}',
|
||||
__typename: 'ProposalRationale',
|
||||
},
|
||||
reference: '',
|
||||
state: 'STATE_ENACTED',
|
||||
datetime: '2022-11-22T13:22:52.370655Z',
|
||||
rejectionReason: null,
|
||||
party: {
|
||||
id: '69464e35bcb8e8a2900ca0f87acaf252d50cf2ab2fc73694845a16b7c8a0dc6f',
|
||||
__typename: 'Party',
|
||||
},
|
||||
errorDetails: null,
|
||||
terms: {
|
||||
closingDatetime: '2022-11-22T13:27:13Z',
|
||||
enactmentDatetime: '2022-11-22T13:27:33Z',
|
||||
change: {
|
||||
networkParameter: {
|
||||
key: 'governance.proposal.asset.requiredParticipation',
|
||||
value: '0.000001',
|
||||
__typename: 'NetworkParameter',
|
||||
},
|
||||
__typename: 'UpdateNetworkParameter',
|
||||
},
|
||||
__typename: 'ProposalTerms',
|
||||
},
|
||||
votes: {
|
||||
yes: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
no: {
|
||||
totalTokens: '0',
|
||||
totalNumber: '0',
|
||||
totalEquityLikeShareWeight: '0',
|
||||
__typename: 'ProposalVoteSide',
|
||||
},
|
||||
__typename: 'ProposalVotes',
|
||||
},
|
||||
__typename: 'Proposal',
|
||||
},
|
||||
__typename: 'ProposalEdge',
|
||||
},
|
||||
],
|
||||
__typename: 'ProposalsConnection',
|
||||
},
|
||||
};
|
||||
@@ -3,11 +3,14 @@ import {
|
||||
navigation,
|
||||
verifyPageHeader,
|
||||
verifyTabHighlighted,
|
||||
waitForSpinner,
|
||||
} from '../../support/common.functions';
|
||||
import {
|
||||
goToMakeNewProposal,
|
||||
governanceProposalType,
|
||||
} from '../../support/governance.functions';
|
||||
import { mockNetworkUpgradeProposal } from '../../support/proposal.functions';
|
||||
|
||||
const proposalDocumentationLink = '[data-testid="proposal-documentation-link"]';
|
||||
const newProposalButton = '[data-testid="new-proposal-link"]';
|
||||
const newProposalLink = '[data-testid="new-proposal-link"]';
|
||||
const governanceDocsUrl = 'https://vega.xyz/governance';
|
||||
const connectToVegaWalletButton = '[data-testid="connect-to-vega-wallet-btn"]';
|
||||
@@ -21,56 +24,140 @@ context(
|
||||
navigateTo(navigation.proposals);
|
||||
});
|
||||
|
||||
describe('with no network change proposals', function () {
|
||||
it('should have governance tab highlighted', function () {
|
||||
verifyTabHighlighted(navigation.proposals);
|
||||
it('should have governance tab highlighted', function () {
|
||||
verifyTabHighlighted(navigation.proposals);
|
||||
});
|
||||
|
||||
it('should have GOVERNANCE header visible', function () {
|
||||
verifyPageHeader('Proposals');
|
||||
});
|
||||
|
||||
it('should be able to see a working link for - find out more about Vega governance', function () {
|
||||
// 3001-VOTE-001
|
||||
cy.get(proposalDocumentationLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Find out more about Vega governance')
|
||||
.and('have.attr', 'href')
|
||||
.and('equal', governanceDocsUrl);
|
||||
|
||||
// 3002-PROP-001
|
||||
cy.request(governanceDocsUrl)
|
||||
.its('body')
|
||||
.then((body) => {
|
||||
if (!body.includes('Govern the network')) {
|
||||
assert.include(
|
||||
body,
|
||||
'Govern the network',
|
||||
`Checking that governance link destination includes 'Govern the network' text`
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should be able to see button for - new proposal', function () {
|
||||
// 3001-VOTE-002
|
||||
cy.get(newProposalLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'New proposal')
|
||||
.and('have.attr', 'href')
|
||||
.and('equal', '/proposals/propose');
|
||||
});
|
||||
|
||||
it('should be able to see a connect wallet button - if vega wallet disconnected and user is submitting new proposal', function () {
|
||||
goToMakeNewProposal(governanceProposalType.NETWORK_PARAMETER);
|
||||
cy.get(connectToVegaWalletButton)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Connect Vega wallet');
|
||||
});
|
||||
|
||||
it('should see open network upgrade proposal on homepage', function () {
|
||||
mockNetworkUpgradeProposal();
|
||||
cy.visit('/');
|
||||
cy.getByTestId('home-proposal-list').within(() => {
|
||||
cy.getByTestId('protocol-upgrade-proposals-list-item').should('exist');
|
||||
cy.getByTestId('protocol-upgrade-proposal-title').should(
|
||||
'have.text',
|
||||
'Vega release v1'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('should have GOVERNANCE header visible', function () {
|
||||
verifyPageHeader('Proposals');
|
||||
});
|
||||
|
||||
it('should be able to see a working link for - find out more about Vega governance', function () {
|
||||
// 3001-VOTE-001
|
||||
cy.get(proposalDocumentationLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Find out more about Vega governance')
|
||||
.and('have.attr', 'href')
|
||||
.and('equal', governanceDocsUrl);
|
||||
|
||||
// 3002-PROP-001
|
||||
cy.request(governanceDocsUrl)
|
||||
.its('body')
|
||||
.then((body) => {
|
||||
if (!body.includes('Govern the network')) {
|
||||
assert.include(
|
||||
body,
|
||||
'Govern the network',
|
||||
`Checking that governance link destination includes 'Govern the network' text`
|
||||
);
|
||||
}
|
||||
it('should see network upgrade proposals in proposals list', function () {
|
||||
mockNetworkUpgradeProposal();
|
||||
navigateTo(navigation.proposals);
|
||||
cy.getByTestId('open-proposals').within(() => {
|
||||
cy.get('li')
|
||||
.eq(0)
|
||||
.should(
|
||||
'have.attr',
|
||||
'data-testid',
|
||||
'protocol-upgrade-proposals-list-item'
|
||||
)
|
||||
.within(() => {
|
||||
cy.get('h2').should('have.text', 'Vega release v1');
|
||||
cy.getByTestId('protocol-upgrade-proposal-type').should(
|
||||
'have.text',
|
||||
'Network Upgrade'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-proposal-release-tag').should(
|
||||
'have.text',
|
||||
'Vega release tagv1'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-proposal-block-height').should(
|
||||
'have.text',
|
||||
'Upgrade block height2015942'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-proposal-status').should(
|
||||
'have.text',
|
||||
'Approved'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('should be able to see button for - new proposal', function () {
|
||||
// 3001-VOTE-002
|
||||
cy.get(newProposalLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'New proposal')
|
||||
.and('have.attr', 'href')
|
||||
.and('equal', '/proposals/propose');
|
||||
cy.getByTestId('closed-proposals').within(() => {
|
||||
cy.getByTestId('protocol-upgrade-proposals-list-item').should(
|
||||
'have.length',
|
||||
1
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// Skipping this test for now, the new proposal button no longer takes a user directly
|
||||
// to a proposal form, instead it takes them to a page where they can select a proposal type.
|
||||
// Keeping this test here for now as it can be repurposed to test the new proposal forms.
|
||||
it.skip('should be able to see a connect wallet button - if vega wallet disconnected and new proposal button selected', function () {
|
||||
cy.get(newProposalButton).should('be.visible').click();
|
||||
cy.get(connectToVegaWalletButton)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Connect Vega wallet');
|
||||
navigateTo(navigation.proposals);
|
||||
waitForSpinner();
|
||||
it('should see details of network upgrade proposal', function () {
|
||||
mockNetworkUpgradeProposal();
|
||||
navigateTo(navigation.proposals);
|
||||
cy.getByTestId('protocol-upgrade-proposals-list-item')
|
||||
.first()
|
||||
.find('[data-testid="view-proposal-btn"]')
|
||||
.click();
|
||||
cy.getByTestId('protocol-upgrade-proposal').within(() => {
|
||||
cy.get('h1').should('have.text', 'Vega Release v1');
|
||||
cy.getByTestId('protocol-upgrade-block-height').should(
|
||||
'have.text',
|
||||
'2015942 (currently 2014133)'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-state').should(
|
||||
'have.text',
|
||||
'Approved'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-release-tag').should(
|
||||
'have.text',
|
||||
'v1'
|
||||
);
|
||||
cy.getByTestId('protocol-upgrade-approval-status')
|
||||
.should('contain.text', '99.98% approval (% validator voting power)')
|
||||
.and('contain.text', '(67% voting power required)');
|
||||
cy.get('h2').should('contain.text', 'Approvers (4/4 validators)');
|
||||
cy.getByTestId('validator-name')
|
||||
.should('have.length', 4)
|
||||
.each(($validator) => {
|
||||
cy.wrap($validator).find('a').should('have.attr', 'href');
|
||||
});
|
||||
cy.getByTestId('validator-voting-power').each(
|
||||
($validatorVotingPower) => {
|
||||
cy.wrap($validatorVotingPower)
|
||||
.invoke('text')
|
||||
.should('contain', '%');
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -334,11 +334,8 @@ context(
|
||||
.parent()
|
||||
.siblings()
|
||||
.invoke('text')
|
||||
.should('have.length.above', 3)
|
||||
.then((el) => {
|
||||
const value = parseFloat(el);
|
||||
cy.wrap(value).should('be.gte', parseFloat(expectedAmount));
|
||||
});
|
||||
.then(parseFloat)
|
||||
.should('be.gte', parseFloat(expectedAmount));
|
||||
|
||||
cy.get(vegaWalletCurrencyTitle)
|
||||
.contains(id)
|
||||
|
||||
@@ -12,6 +12,7 @@ context(
|
||||
{ tags: '@smoke' },
|
||||
function () {
|
||||
before('navigate to withdrawals page', function () {
|
||||
cy.clearAllLocalStorage();
|
||||
cy.visit('/');
|
||||
navigateTo(navigation.withdraw);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { addSeconds, millisecondsToSeconds } from 'date-fns';
|
||||
import type { ProposalSubmissionBody } from '@vegaprotocol/wallet';
|
||||
import { aliasGQLQuery } from '@vegaprotocol/cypress';
|
||||
import { upgradeProposalsData } from '../fixtures/mocks/network-upgrade';
|
||||
import { proposalsData } from '../fixtures/mocks/proposals';
|
||||
import { nodeData } from '../fixtures/mocks/nodes';
|
||||
|
||||
export function createUpdateNetworkProposalTxBody(): ProposalSubmissionBody {
|
||||
const MIN_CLOSE_SEC = 5;
|
||||
@@ -80,3 +84,11 @@ export function createFreeFormProposalTxBody(): ProposalSubmissionBody {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function mockNetworkUpgradeProposal() {
|
||||
cy.mockGQL((req) => {
|
||||
aliasGQLQuery(req, 'Nodes', nodeData);
|
||||
aliasGQLQuery(req, 'Proposals', proposalsData);
|
||||
aliasGQLQuery(req, 'ProtocolUpgrades', upgradeProposalsData);
|
||||
});
|
||||
}
|
||||
|
||||
+2
-5
@@ -57,10 +57,7 @@ export const ProtocolUpdateProposalDetailApprovals = ({
|
||||
noBorder={index === consensusApprovals?.length - 1}
|
||||
key={validator.pubkey}
|
||||
>
|
||||
<div
|
||||
className="-mb-3 mt-1"
|
||||
data-testid={`validator-${validator.id}`}
|
||||
>
|
||||
<div className="-mb-3 mt-1" data-testid={'validator-name'}>
|
||||
<ValidatorDetailsLink
|
||||
id={validator.id}
|
||||
avatarUrl={validator.avatarUrl}
|
||||
@@ -68,7 +65,7 @@ export const ProtocolUpdateProposalDetailApprovals = ({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<span>
|
||||
<span data-testid="validator-voting-power">
|
||||
{getNormalisedVotingPower(
|
||||
validator.rankingScore.votingPower,
|
||||
2
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ describe('ProtocolUpdateProposalDetailApprovals', () => {
|
||||
|
||||
it('renders the correct number of consensus approvers', () => {
|
||||
renderComponent();
|
||||
const validators = screen.getAllByTestId(/validator-/i);
|
||||
const validators = screen.getAllByTestId(/validator-name/);
|
||||
expect(validators.length).toBe(mockValidators.length);
|
||||
});
|
||||
|
||||
|
||||
@@ -36,10 +36,20 @@
|
||||
"tranche_id": 56,
|
||||
"tranche_start": "2023-04-20T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-20T00:00:00.000Z",
|
||||
"total_added": "15761.125",
|
||||
"total_added": "15999.125",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "15494.9188690682869786625",
|
||||
"locked_amount": "13596.4045541087969481125",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "188",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tx": "0xefa5cb034a994bd2cf2b100b1ecca1877038e7b1188fab4ebf2065cb165027e4"
|
||||
},
|
||||
{
|
||||
"amount": "50",
|
||||
"user": "0xAc1c2783d64c29CDB79608f5B66a37Fd1ea35dD6",
|
||||
"tx": "0xc1ede6de1653f205e0a743f609835648a67287a271a994cd141911ce13d5cac7"
|
||||
},
|
||||
{
|
||||
"amount": "241.5",
|
||||
"user": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
|
||||
@@ -183,6 +193,36 @@
|
||||
],
|
||||
"withdrawals": [],
|
||||
"users": [
|
||||
{
|
||||
"address": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "188",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tranche_id": 56,
|
||||
"tx": "0xefa5cb034a994bd2cf2b100b1ecca1877038e7b1188fab4ebf2065cb165027e4"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "188",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "188"
|
||||
},
|
||||
{
|
||||
"address": "0xAc1c2783d64c29CDB79608f5B66a37Fd1ea35dD6",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "50",
|
||||
"user": "0xAc1c2783d64c29CDB79608f5B66a37Fd1ea35dD6",
|
||||
"tranche_id": 56,
|
||||
"tx": "0xc1ede6de1653f205e0a743f609835648a67287a271a994cd141911ce13d5cac7"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "50",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "50"
|
||||
},
|
||||
{
|
||||
"address": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
|
||||
"deposits": [
|
||||
@@ -664,10 +704,15 @@
|
||||
"tranche_id": 54,
|
||||
"tranche_start": "2023-04-06T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-06T00:00:00.000Z",
|
||||
"total_added": "8865",
|
||||
"total_removed": "362.31015740205",
|
||||
"locked_amount": "4578.269739583333005",
|
||||
"total_added": "8976",
|
||||
"total_removed": "490.11243517665",
|
||||
"locked_amount": "3439.2001111111111776",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "111",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tx": "0x1229e077f48b796678436bfa8143cea3ae71df58b589ac922be205c4482be235"
|
||||
},
|
||||
{
|
||||
"amount": "33",
|
||||
"user": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
|
||||
@@ -825,6 +870,11 @@
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
"tx": "0x05d086879e23724f1397d41adcbe2f3316dd4039c240edbc3cbbcacf1ca1d00e"
|
||||
},
|
||||
{
|
||||
"amount": "127.8022777746",
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
"tx": "0xb67468e99866887e95c5a211fe8611d107b02ef094d9b90343820366a5e8c7a0"
|
||||
},
|
||||
{
|
||||
"amount": "52.2185023074",
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
@@ -832,6 +882,21 @@
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"address": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "111",
|
||||
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
|
||||
"tranche_id": 54,
|
||||
"tx": "0x1229e077f48b796678436bfa8143cea3ae71df58b589ac922be205c4482be235"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"total_tokens": "111",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "111"
|
||||
},
|
||||
{
|
||||
"address": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
|
||||
"deposits": [
|
||||
@@ -1050,6 +1115,12 @@
|
||||
"tranche_id": 54,
|
||||
"tx": "0x05d086879e23724f1397d41adcbe2f3316dd4039c240edbc3cbbcacf1ca1d00e"
|
||||
},
|
||||
{
|
||||
"amount": "127.8022777746",
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
"tranche_id": 54,
|
||||
"tx": "0xb67468e99866887e95c5a211fe8611d107b02ef094d9b90343820366a5e8c7a0"
|
||||
},
|
||||
{
|
||||
"amount": "52.2185023074",
|
||||
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
|
||||
@@ -1058,8 +1129,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "858",
|
||||
"withdrawn_tokens": "296.67303008772",
|
||||
"remaining_tokens": "561.32696991228"
|
||||
"withdrawn_tokens": "424.47530786232",
|
||||
"remaining_tokens": "433.52469213768"
|
||||
},
|
||||
{
|
||||
"address": "0x0bBf7580e036eA5D69ABe679CC90117EeC2e3dc1",
|
||||
@@ -4407,7 +4478,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "86666.297",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "54253.8851505212161988738",
|
||||
"locked_amount": "53304.4390480842904971845",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "86666.297",
|
||||
@@ -4473,7 +4544,7 @@
|
||||
"tranche_end": "2023-06-01T00:00:00.000Z",
|
||||
"total_added": "2500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "569.96289300976805",
|
||||
"locked_amount": "515.03643925518925",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2500",
|
||||
@@ -4594,7 +4665,7 @@
|
||||
"tranche_end": "2023-09-01T00:00:00.000Z",
|
||||
"total_added": "17500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "12696.37350920893675",
|
||||
"locked_amount": "12316.06751962560225",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "12500",
|
||||
@@ -4860,8 +4931,8 @@
|
||||
"tranche_start": "2023-02-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-08-01T00:00:00.000Z",
|
||||
"total_added": "37500",
|
||||
"total_removed": "12294.731717775",
|
||||
"locked_amount": "21234.79943600368125",
|
||||
"total_removed": "12539.2989369",
|
||||
"locked_amount": "20406.35071362799125",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -4890,6 +4961,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x2c8a0681fe27258861489cd7a891cf213c7ab930d86b1bf08cd54f2f3739a8b5"
|
||||
},
|
||||
{
|
||||
"amount": "244.567219125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x4bc7559edf36b6ecda7656f8066479395ea441daf0ad37ad4324814348e41643"
|
||||
},
|
||||
{
|
||||
"amount": "158.943370125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -5046,6 +5122,12 @@
|
||||
"tranche_id": 34,
|
||||
"tx": "0x2c8a0681fe27258861489cd7a891cf213c7ab930d86b1bf08cd54f2f3739a8b5"
|
||||
},
|
||||
{
|
||||
"amount": "244.567219125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 34,
|
||||
"tx": "0x4bc7559edf36b6ecda7656f8066479395ea441daf0ad37ad4324814348e41643"
|
||||
},
|
||||
{
|
||||
"amount": "158.943370125",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -5186,8 +5268,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "3059.282439375",
|
||||
"remaining_tokens": "4440.717560625"
|
||||
"withdrawn_tokens": "3303.8496585",
|
||||
"remaining_tokens": "4196.1503415"
|
||||
},
|
||||
{
|
||||
"address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600",
|
||||
@@ -5225,7 +5307,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "54204.385306806945473172",
|
||||
"locked_amount": "53255.8054544746044383625",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@@ -5258,7 +5340,7 @@
|
||||
"tranche_end": "2024-04-01T00:00:00.000Z",
|
||||
"total_added": "54144.7663",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "51259.01278091454623854912",
|
||||
"locked_amount": "50667.46703183722144592557",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "54144.7663",
|
||||
@@ -5291,7 +5373,7 @@
|
||||
"tranche_end": "2023-09-03T00:00:00.000Z",
|
||||
"total_added": "62600",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "23238.02874809741452",
|
||||
"locked_amount": "22552.23359969558432",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10000",
|
||||
@@ -5484,7 +5566,7 @@
|
||||
"tranche_end": "2023-09-17T00:00:00.000Z",
|
||||
"total_added": "5000",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "2047.85340563165885",
|
||||
"locked_amount": "1993.0774353120245",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "5000",
|
||||
@@ -6024,8 +6106,8 @@
|
||||
"tranche_start": "2022-11-01T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-01T00:00:00.000Z",
|
||||
"total_added": "22500",
|
||||
"total_removed": "6871.43713545",
|
||||
"locked_amount": "1304.415573204420675",
|
||||
"total_removed": "7115.9985996",
|
||||
"locked_amount": "807.34633977900456",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "7500",
|
||||
@@ -6054,6 +6136,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x15840e283faffb39a5d0e3389137ec92cec3deee7df535a534908ccd7d6b0873"
|
||||
},
|
||||
{
|
||||
"amount": "244.56146415",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x00275dfbd06b609e69b430eef7fe04c7bb64314904a0478a0e55b643f7f0bc09"
|
||||
},
|
||||
{
|
||||
"amount": "158.9433702",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -6265,6 +6352,12 @@
|
||||
"tranche_id": 33,
|
||||
"tx": "0x15840e283faffb39a5d0e3389137ec92cec3deee7df535a534908ccd7d6b0873"
|
||||
},
|
||||
{
|
||||
"amount": "244.56146415",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 33,
|
||||
"tx": "0x00275dfbd06b609e69b430eef7fe04c7bb64314904a0478a0e55b643f7f0bc09"
|
||||
},
|
||||
{
|
||||
"amount": "158.9433702",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -6483,8 +6576,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "7500",
|
||||
"withdrawn_tokens": "6871.43713545",
|
||||
"remaining_tokens": "628.56286455"
|
||||
"withdrawn_tokens": "7115.9985996",
|
||||
"remaining_tokens": "384.0014004"
|
||||
},
|
||||
{
|
||||
"address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1",
|
||||
@@ -6509,7 +6602,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "928642.9598472029154",
|
||||
"locked_amount": "225846.4546178330654320676",
|
||||
"locked_amount": "204594.1627448135826823752",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@@ -40325,7 +40418,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "715655.108029600523393",
|
||||
"locked_amount": "371548.694092943839794156471",
|
||||
"locked_amount": "338891.320746260923506948901",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@@ -41717,8 +41810,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15870102.715470999700000001",
|
||||
"total_removed": "835090.78677275839915352",
|
||||
"locked_amount": "6617175.39918817550807202992275848610786696",
|
||||
"total_removed": "860379.54790441442685852",
|
||||
"locked_amount": "6501374.45010461734405894576483270014193025",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@@ -42222,6 +42315,16 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "10150.87581603206683",
|
||||
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
|
||||
"tx": "0x2ee57ee8a712525955ad807f4d45eeaa5f6388bf0b4fceabc7de6871899f736e"
|
||||
},
|
||||
{
|
||||
"amount": "913.910324501590625",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x455d2e8214a5071fd4de1642939780068d4694cc2a774e7a3ab9283c4d52e847"
|
||||
},
|
||||
{
|
||||
"amount": "981.387731774910625",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -42277,6 +42380,21 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xa56a064890829624fb37f887adb87987dfafd709ebea2cdf423c91a38e91b82f"
|
||||
},
|
||||
{
|
||||
"amount": "984.287150968688875",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xbf3e00aef8ae756fb2f5de5d3eec6f925e9005c7acca1a6c2f88a84ad1e44fba"
|
||||
},
|
||||
{
|
||||
"amount": "12786.192214",
|
||||
"user": "0xF4c75FdbAe821C6B5DBB9f001bB23cBA58D1bA37",
|
||||
"tx": "0x57c9c9396f67fb377f2d7cca30a1a6e6b73267408efde1239cbfdfd99c333345"
|
||||
},
|
||||
{
|
||||
"amount": "453.495626153681375",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xdad160466fa0b4805f3a12ff558d429bf48f81f9b99653dbce172d261861f1d0"
|
||||
},
|
||||
{
|
||||
"amount": "998.454771147362375",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -44315,6 +44433,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "913.910324501590625",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0x455d2e8214a5071fd4de1642939780068d4694cc2a774e7a3ab9283c4d52e847"
|
||||
},
|
||||
{
|
||||
"amount": "981.387731774910625",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -44375,6 +44499,18 @@
|
||||
"tranche_id": 2,
|
||||
"tx": "0xa56a064890829624fb37f887adb87987dfafd709ebea2cdf423c91a38e91b82f"
|
||||
},
|
||||
{
|
||||
"amount": "984.287150968688875",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xbf3e00aef8ae756fb2f5de5d3eec6f925e9005c7acca1a6c2f88a84ad1e44fba"
|
||||
},
|
||||
{
|
||||
"amount": "453.495626153681375",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xdad160466fa0b4805f3a12ff558d429bf48f81f9b99653dbce172d261861f1d0"
|
||||
},
|
||||
{
|
||||
"amount": "998.454771147362375",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@@ -45811,8 +45947,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "259998.8875",
|
||||
"withdrawn_tokens": "150733.980517927478375",
|
||||
"remaining_tokens": "109264.906982072521625"
|
||||
"withdrawn_tokens": "153085.67361955143925",
|
||||
"remaining_tokens": "106913.21388044856075"
|
||||
},
|
||||
{
|
||||
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
|
||||
@@ -46039,6 +46175,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "10150.87581603206683",
|
||||
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
|
||||
"tranche_id": 2,
|
||||
"tx": "0x2ee57ee8a712525955ad807f4d45eeaa5f6388bf0b4fceabc7de6871899f736e"
|
||||
},
|
||||
{
|
||||
"amount": "2873.74755113623213",
|
||||
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
|
||||
@@ -46311,8 +46453,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "150551.801",
|
||||
"withdrawn_tokens": "78415.36940998198906",
|
||||
"remaining_tokens": "72136.43159001801094"
|
||||
"withdrawn_tokens": "88566.24522601405589",
|
||||
"remaining_tokens": "61985.55577398594411"
|
||||
},
|
||||
{
|
||||
"address": "0x4d982Ab0823fD2f48e934a7be2bb0a5374a26148",
|
||||
@@ -46532,6 +46674,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "12786.192214",
|
||||
"user": "0xF4c75FdbAe821C6B5DBB9f001bB23cBA58D1bA37",
|
||||
"tranche_id": 2,
|
||||
"tx": "0x57c9c9396f67fb377f2d7cca30a1a6e6b73267408efde1239cbfdfd99c333345"
|
||||
},
|
||||
{
|
||||
"amount": "934.96553",
|
||||
"user": "0xF4c75FdbAe821C6B5DBB9f001bB23cBA58D1bA37",
|
||||
@@ -46780,8 +46928,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "200000",
|
||||
"withdrawn_tokens": "104171.325864",
|
||||
"remaining_tokens": "95828.674136"
|
||||
"withdrawn_tokens": "116957.518078",
|
||||
"remaining_tokens": "83042.481922"
|
||||
},
|
||||
{
|
||||
"address": "0x1b956E6c00E238194B331eddEFF72Cb5f28A8d01",
|
||||
@@ -48163,8 +48311,8 @@
|
||||
"tranche_start": "2021-11-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-05T00:00:00.000Z",
|
||||
"total_added": "14597706.0446472999",
|
||||
"total_removed": "5845111.643096907348272126",
|
||||
"locked_amount": "387488.8511763643682805777108705054",
|
||||
"total_removed": "5847991.884210280507681376",
|
||||
"locked_amount": "280582.1543784642464604600874073187",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129284.449",
|
||||
@@ -48373,6 +48521,11 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "1257.7360413991436375",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0x42fa522871101c2d402faba52603df54599654f29ef5fe1211a9ea058b7eaad9"
|
||||
},
|
||||
{
|
||||
"amount": "1360.32447632896938825",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -48448,6 +48601,16 @@
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0xc4a521e74b6b9c9c01e7fbd950f4096d3e6473a773818b4fdf0c9d974ee5fc7e"
|
||||
},
|
||||
{
|
||||
"amount": "993.45434720929767175",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0x6b1bd1880e5539566cb7110e80ef3e877e3c46a2fcd88798e82211a962dd2b7b"
|
||||
},
|
||||
{
|
||||
"amount": "629.0507247647181",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0x537a8c34bee648cc1e658c0e55d30202694887899bfcbe529f9cf8284a4e90eb"
|
||||
},
|
||||
{
|
||||
"amount": "37462.74710421168752574",
|
||||
"user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8",
|
||||
@@ -51663,6 +51826,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "1257.7360413991436375",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0x42fa522871101c2d402faba52603df54599654f29ef5fe1211a9ea058b7eaad9"
|
||||
},
|
||||
{
|
||||
"amount": "1360.32447632896938825",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -51735,6 +51904,18 @@
|
||||
"tranche_id": 3,
|
||||
"tx": "0xc4a521e74b6b9c9c01e7fbd950f4096d3e6473a773818b4fdf0c9d974ee5fc7e"
|
||||
},
|
||||
{
|
||||
"amount": "993.45434720929767175",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0x6b1bd1880e5539566cb7110e80ef3e877e3c46a2fcd88798e82211a962dd2b7b"
|
||||
},
|
||||
{
|
||||
"amount": "629.0507247647181",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0x537a8c34bee648cc1e658c0e55d30202694887899bfcbe529f9cf8284a4e90eb"
|
||||
},
|
||||
{
|
||||
"amount": "1383.345213676043696",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@@ -54473,8 +54654,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "359123.469575",
|
||||
"withdrawn_tokens": "348774.8193074565797845",
|
||||
"remaining_tokens": "10348.6502675434202155"
|
||||
"withdrawn_tokens": "351655.06042082973919375",
|
||||
"remaining_tokens": "7468.40915417026080625"
|
||||
},
|
||||
{
|
||||
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
|
||||
@@ -58108,8 +58289,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "43120.0853616251849",
|
||||
"locked_amount": "58874.014441908253564521489193296",
|
||||
"total_removed": "43302.7476142891849",
|
||||
"locked_amount": "53699.266957621714397527714764084",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
@@ -64728,6 +64909,11 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "182.662252664",
|
||||
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
|
||||
"tx": "0xc182a183d124ab4faa413e71faa8c764fc265b4c568a5025ead367fbb86da331"
|
||||
},
|
||||
{
|
||||
"amount": "168.502276762",
|
||||
"user": "0x38A292CB98Dc602ECAFF94E8E5fADD9800e4bA13",
|
||||
@@ -86303,6 +86489,12 @@
|
||||
}
|
||||
],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "182.662252664",
|
||||
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
|
||||
"tranche_id": 5,
|
||||
"tx": "0xc182a183d124ab4faa413e71faa8c764fc265b4c568a5025ead367fbb86da331"
|
||||
},
|
||||
{
|
||||
"amount": "78.04403856",
|
||||
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
|
||||
@@ -86317,8 +86509,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "400",
|
||||
"withdrawn_tokens": "171.538952308",
|
||||
"remaining_tokens": "228.461047692"
|
||||
"withdrawn_tokens": "354.201204972",
|
||||
"remaining_tokens": "45.798795028"
|
||||
},
|
||||
{
|
||||
"address": "0xF53D81D9f3A1465df9AD1b12ddDB5cC585D96877",
|
||||
@@ -87795,7 +87987,7 @@
|
||||
"tranche_start": "2021-12-05T00:00:00.000Z",
|
||||
"tranche_end": "2022-06-05T00:00:00.000Z",
|
||||
"total_added": "171288.42",
|
||||
"total_removed": "69390.5995794947989",
|
||||
"total_removed": "69890.5995794947989",
|
||||
"locked_amount": "0",
|
||||
"deposits": [
|
||||
{
|
||||
@@ -92035,6 +92227,16 @@
|
||||
"user": "0x0715B8bA27dB75F7601A9D8E22c15dcA1487FB70",
|
||||
"tx": "0x11c685c41ff0c2d5f1d7fe3b08dc84a7ddb9160764a45bc61b8f39df94729634"
|
||||
},
|
||||
{
|
||||
"amount": "250",
|
||||
"user": "0xf8Ec254406f878dA2BEd160730d238524Af3D5F6",
|
||||
"tx": "0xb79fdf2dddc0ac091d7cdc737800683482d24367f18daaf5ab98c703b30bfee5"
|
||||
},
|
||||
{
|
||||
"amount": "250",
|
||||
"user": "0xBD1da3A721510B6d76f5b2C553d31753cc148bEC",
|
||||
"tx": "0x17504994220684f4ba61ec374fdd5b0e4c0e0a9cfb15aa6794338b5a4de9eb68"
|
||||
},
|
||||
{
|
||||
"amount": "1250",
|
||||
"user": "0x9405F540EcC1204801De5C4444D06386BD6693F0",
|
||||
@@ -99185,10 +99387,17 @@
|
||||
"tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "250",
|
||||
"user": "0xBD1da3A721510B6d76f5b2C553d31753cc148bEC",
|
||||
"tranche_id": 6,
|
||||
"tx": "0x17504994220684f4ba61ec374fdd5b0e4c0e0a9cfb15aa6794338b5a4de9eb68"
|
||||
}
|
||||
],
|
||||
"total_tokens": "250",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "250"
|
||||
"withdrawn_tokens": "250",
|
||||
"remaining_tokens": "0"
|
||||
},
|
||||
{
|
||||
"address": "0x4e8bA6747F20009163e51Ff1b5D3edd3Ef7c6C90",
|
||||
@@ -99222,10 +99431,17 @@
|
||||
"tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307"
|
||||
}
|
||||
],
|
||||
"withdrawals": [],
|
||||
"withdrawals": [
|
||||
{
|
||||
"amount": "250",
|
||||
"user": "0xf8Ec254406f878dA2BEd160730d238524Af3D5F6",
|
||||
"tranche_id": 6,
|
||||
"tx": "0xb79fdf2dddc0ac091d7cdc737800683482d24367f18daaf5ab98c703b30bfee5"
|
||||
}
|
||||
],
|
||||
"total_tokens": "250",
|
||||
"withdrawn_tokens": "0",
|
||||
"remaining_tokens": "250"
|
||||
"withdrawn_tokens": "250",
|
||||
"remaining_tokens": "0"
|
||||
},
|
||||
{
|
||||
"address": "0xd995e89D6cCB2252388b9BaE0173981b5EfA0817",
|
||||
@@ -143316,6 +143532,11 @@
|
||||
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
|
||||
"tx": "0x11aafa8a2fb510a50d52e5d1e149c5c2027ad2c3dc2d9ef67c18d391c0331c49"
|
||||
},
|
||||
{
|
||||
"amount": "0",
|
||||
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
|
||||
"tx": "0x2e48ba2e6ca4994286e85e57d26b578fb0fd625f44a6fd27202476bb18575a40"
|
||||
},
|
||||
{
|
||||
"amount": "0",
|
||||
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
|
||||
@@ -143604,6 +143825,12 @@
|
||||
"tranche_id": 9,
|
||||
"tx": "0x11aafa8a2fb510a50d52e5d1e149c5c2027ad2c3dc2d9ef67c18d391c0331c49"
|
||||
},
|
||||
{
|
||||
"amount": "0",
|
||||
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
|
||||
"tranche_id": 9,
|
||||
"tx": "0x2e48ba2e6ca4994286e85e57d26b578fb0fd625f44a6fd27202476bb18575a40"
|
||||
},
|
||||
{
|
||||
"amount": "0",
|
||||
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
const { defineConfig } = require('cypress');
|
||||
|
||||
module.exports = defineConfig({
|
||||
reporter: '../../node_modules/cypress-mochawesome-reporter',
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {
|
||||
require('cypress-mochawesome-reporter/plugin')(on);
|
||||
require('@cypress/grep/src/plugin')(config);
|
||||
return config;
|
||||
},
|
||||
|
||||
@@ -25,17 +25,12 @@ describe('accounts', { tags: '@smoke' }, () => {
|
||||
cy.getByTestId('tab-accounts')
|
||||
.get(tradingAccountRowId)
|
||||
.find('[col-id="accounts-actions"]')
|
||||
.should('have.text', 'DepositWithdraw');
|
||||
.should('have.text', '');
|
||||
|
||||
cy.getByTestId('tab-accounts')
|
||||
.get(tradingAccountRowId)
|
||||
.find('[data-testid="deposit"]')
|
||||
.should('have.text', 'Deposit');
|
||||
|
||||
cy.getByTestId('tab-accounts')
|
||||
.get(tradingAccountRowId)
|
||||
.find('[col-id="accounts-actions"] [data-testid="withdraw"]')
|
||||
.should('have.text', 'Withdraw');
|
||||
.find('[col-id="accounts-actions"]')
|
||||
.should('have.text', '');
|
||||
|
||||
cy.getByTestId('tab-accounts')
|
||||
.get(tradingAccountRowId)
|
||||
|
||||
@@ -2,6 +2,7 @@ import '@vegaprotocol/cypress';
|
||||
import 'cypress-real-events/support';
|
||||
import registerCypressGrep from '@cypress/grep';
|
||||
import { addMockTradingPage } from './trading';
|
||||
import 'cypress-mochawesome-reporter/register';
|
||||
|
||||
registerCypressGrep();
|
||||
addMockTradingPage();
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
useThrottledDataProvider,
|
||||
} from '@vegaprotocol/react-helpers';
|
||||
import { AsyncRenderer, ExternalLink, Splash } from '@vegaprotocol/ui-toolkit';
|
||||
|
||||
import { marketProvider, marketDataProvider } from '@vegaprotocol/market-list';
|
||||
import { useGlobalStore, usePageTitleStore } from '../../stores';
|
||||
import { TradeGrid, TradePanels } from './trade-grid';
|
||||
|
||||
@@ -12,11 +12,10 @@ import { memo, useState } from 'react';
|
||||
import type { ReactNode, ComponentProps } from 'react';
|
||||
import { DepthChartContainer } from '@vegaprotocol/market-depth';
|
||||
import { CandlesChartContainer } from '@vegaprotocol/candles-chart';
|
||||
import { OracleBanner } from '../../components/banner';
|
||||
import {
|
||||
Tab,
|
||||
LocalStoragePersistTabs as Tabs,
|
||||
ResizableGrid,
|
||||
ResizableGridPanel,
|
||||
Splash,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
@@ -33,6 +32,10 @@ import {
|
||||
useMarketClickHandler,
|
||||
useMarketLiquidityClickHandler,
|
||||
} from '../../lib/hooks/use-market-click-handler';
|
||||
import {
|
||||
ResizableGrid,
|
||||
ResizableGridPanel,
|
||||
} from '../../components/resizable-grid';
|
||||
|
||||
type MarketDependantView =
|
||||
| typeof CandlesChartContainer
|
||||
@@ -271,7 +274,10 @@ export const TradeGrid = ({
|
||||
}: TradeGridProps) => {
|
||||
return (
|
||||
<div className="h-full grid grid-rows-[min-content_1fr]">
|
||||
<TradeMarketHeader market={market} onSelect={onSelect} />
|
||||
<div>
|
||||
<TradeMarketHeader market={market} onSelect={onSelect} />
|
||||
<OracleBanner marketId={market?.id || ''} />
|
||||
</div>
|
||||
<MainGrid
|
||||
marketId={market?.id || ''}
|
||||
onSelect={onSelect}
|
||||
|
||||
@@ -2,18 +2,13 @@ import { titlefy } from '@vegaprotocol/utils';
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
import { PositionsContainer } from '@vegaprotocol/positions';
|
||||
import { OrderListContainer } from '@vegaprotocol/orders';
|
||||
import {
|
||||
ResizableGridPanel,
|
||||
Tab,
|
||||
LocalStoragePersistTabs as Tabs,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { Tab, LocalStoragePersistTabs as Tabs } from '@vegaprotocol/ui-toolkit';
|
||||
import { WithdrawalsContainer } from './withdrawals-container';
|
||||
import { FillsContainer } from '@vegaprotocol/fills';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { VegaWalletContainer } from '../../components/vega-wallet-container';
|
||||
import { DepositsContainer } from './deposits-container';
|
||||
import { ResizableGrid } from '@vegaprotocol/ui-toolkit';
|
||||
import { LayoutPriority } from 'allotment';
|
||||
import { usePageTitleStore } from '../../stores';
|
||||
import { LedgerContainer } from '@vegaprotocol/ledger';
|
||||
@@ -23,6 +18,10 @@ import {
|
||||
useMarketClickHandler,
|
||||
useMarketLiquidityClickHandler,
|
||||
} from '../../lib/hooks/use-market-click-handler';
|
||||
import {
|
||||
ResizableGrid,
|
||||
ResizableGridPanel,
|
||||
} from '../../components/resizable-grid';
|
||||
|
||||
export const Portfolio = () => {
|
||||
const { updateTitle } = usePageTitleStore((store) => ({
|
||||
|
||||
+3
-6
@@ -1,16 +1,13 @@
|
||||
import { AnnouncementBanner } from '@vegaprotocol/announcements';
|
||||
import { AnnouncementBanner as Banner } from '@vegaprotocol/announcements';
|
||||
import { useEnvironment } from '@vegaprotocol/environment';
|
||||
|
||||
export const Banner = () => {
|
||||
export const AnnouncementBanner = () => {
|
||||
const { ANNOUNCEMENTS_CONFIG_URL } = useEnvironment();
|
||||
|
||||
// Return an empty div so that the grid layout in _app.page.ts
|
||||
// renders correctly
|
||||
if (!ANNOUNCEMENTS_CONFIG_URL) {
|
||||
return <div />;
|
||||
}
|
||||
|
||||
return (
|
||||
<AnnouncementBanner app="console" configUrl={ANNOUNCEMENTS_CONFIG_URL} />
|
||||
);
|
||||
return <Banner app="console" configUrl={ANNOUNCEMENTS_CONFIG_URL} />;
|
||||
};
|
||||
@@ -1 +1,2 @@
|
||||
export * from './banner';
|
||||
export * from './announcement-banner';
|
||||
export * from './oracle-banner';
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
import { useMarketOracle } from '@vegaprotocol/market-info';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import { Intent, NotificationBanner } from '@vegaprotocol/ui-toolkit';
|
||||
|
||||
const oracleStatuses = {
|
||||
UNKNOWN: t(
|
||||
"This public key's proofs have not been verified yet, or no proofs have been provided yet."
|
||||
),
|
||||
GOOD: t("This public key's proofs have been verified."),
|
||||
SUSPICIOUS: t(
|
||||
'This public key is suspected to be acting in bad faith, pending investigation.'
|
||||
),
|
||||
MALICIOUS: t('This public key has been observed acting in bad faith.'),
|
||||
RETIRED: t('This public key is no longer in use.'),
|
||||
COMPROMISED: t(
|
||||
'This public key is no longer in the control of its original owners.'
|
||||
),
|
||||
};
|
||||
|
||||
export const OracleBanner = ({ marketId }: { marketId: string }) => {
|
||||
const oracle = useMarketOracle(marketId);
|
||||
if (!oracle || oracle.status === 'GOOD') {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<NotificationBanner intent={Intent.Danger}>
|
||||
<div>
|
||||
Oracle status for this market is {oracle.status}.{' '}
|
||||
{oracleStatuses[oracle.status]}
|
||||
</div>
|
||||
{oracle.status_reason ? (
|
||||
<ReactMarkdown
|
||||
className="react-markdown-container"
|
||||
skipHtml={true}
|
||||
disallowedElements={['img']}
|
||||
linkTarget="_blank"
|
||||
>
|
||||
{oracle.status_reason}
|
||||
</ReactMarkdown>
|
||||
) : null}
|
||||
</NotificationBanner>
|
||||
);
|
||||
};
|
||||
@@ -30,7 +30,7 @@ import ToastsManager from './toasts-manager';
|
||||
import { HashRouter, useLocation, useSearchParams } from 'react-router-dom';
|
||||
import { Connectors } from '../lib/vega-connectors';
|
||||
import { ViewingBanner } from '../components/viewing-banner';
|
||||
import { Banner } from '../components/banner';
|
||||
import { AnnouncementBanner } from '../components/banner';
|
||||
import { AppLoader, DynamicLoader } from '../components/app-loader';
|
||||
import { Navbar } from '../components/navbar';
|
||||
import { ENV } from '../lib/config';
|
||||
@@ -86,7 +86,7 @@ function AppBody({ Component }: AppProps) {
|
||||
</Head>
|
||||
<Title />
|
||||
<div className={gridClasses}>
|
||||
<Banner />
|
||||
<AnnouncementBanner />
|
||||
<Navbar theme={VEGA_ENV === Networks.TESTNET ? 'yellow' : 'system'} />
|
||||
<ViewingBanner />
|
||||
<main data-testid={location.pathname}>
|
||||
|
||||
@@ -61,14 +61,7 @@ describe('AccountsTable', () => {
|
||||
);
|
||||
});
|
||||
const cells = await screen.findAllByRole('gridcell');
|
||||
const expectedValues = [
|
||||
'tBTC',
|
||||
'1,256.00',
|
||||
'1,256.00',
|
||||
'2,512.00',
|
||||
'Deposit',
|
||||
'Withdraw',
|
||||
];
|
||||
const expectedValues = ['tBTC', '1,256.00', '1,256.00', '2,512.00', ''];
|
||||
cells.forEach((cell, i) => {
|
||||
expect(cell).toHaveTextContent(expectedValues[i]);
|
||||
});
|
||||
|
||||
@@ -9,7 +9,17 @@ import type {
|
||||
VegaICellRendererParams,
|
||||
VegaValueFormatterParams,
|
||||
} from '@vegaprotocol/datagrid';
|
||||
import { Button, ButtonLink, Dialog } from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
Button,
|
||||
ButtonLink,
|
||||
Dialog,
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuGridTrigger,
|
||||
DropdownMenuItem,
|
||||
VegaIcon,
|
||||
VegaIconNames,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { TooltipCellComponent } from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
AgGridDynamic as AgGrid,
|
||||
@@ -122,7 +132,7 @@ export const AccountTable = forwardRef<AgGridReact, AccountTableProps>(
|
||||
params.data.asset.id === pinnedAssetId &&
|
||||
new BigNumber(params.data.total).isLessThanOrEqualTo(0)
|
||||
? 32
|
||||
: 22,
|
||||
: 24,
|
||||
[pinnedAssetId]
|
||||
);
|
||||
|
||||
@@ -256,7 +266,7 @@ export const AccountTable = forwardRef<AgGridReact, AccountTableProps>(
|
||||
colId="accounts-actions"
|
||||
headerName=""
|
||||
sortable={false}
|
||||
minWidth={200}
|
||||
maxWidth={200}
|
||||
type="rightAligned"
|
||||
cellRenderer={({
|
||||
data,
|
||||
@@ -283,30 +293,62 @@ export const AccountTable = forwardRef<AgGridReact, AccountTableProps>(
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<span className="mx-1" />
|
||||
{!props.isReadOnly && (
|
||||
<ButtonLink
|
||||
data-testid="deposit"
|
||||
onClick={() => {
|
||||
onClickDeposit && onClickDeposit(data.asset.id);
|
||||
}}
|
||||
>
|
||||
{t('Deposit')}
|
||||
</ButtonLink>
|
||||
)}
|
||||
<span className="mx-1" />
|
||||
{!props.isReadOnly && (
|
||||
<ButtonLink
|
||||
data-testid="withdraw"
|
||||
onClick={() =>
|
||||
onClickWithdraw && onClickWithdraw(data.asset.id)
|
||||
}
|
||||
>
|
||||
{t('Withdraw')}
|
||||
</ButtonLink>
|
||||
)}
|
||||
</>
|
||||
!props.isReadOnly && (
|
||||
<DropdownMenu
|
||||
trigger={
|
||||
<DropdownMenuGridTrigger className="mr-2"></DropdownMenuGridTrigger>
|
||||
}
|
||||
>
|
||||
<DropdownMenuContent>
|
||||
<DropdownMenuItem
|
||||
key={'deposit'}
|
||||
data-testid="deposit"
|
||||
onClick={() => {
|
||||
onClickDeposit && onClickDeposit(data.asset.id);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<VegaIcon
|
||||
name={VegaIconNames.DEPOSIT}
|
||||
size={16}
|
||||
/>
|
||||
{t('Deposit')}
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
key={'withdraw'}
|
||||
data-testid="withdraw"
|
||||
onClick={() =>
|
||||
onClickWithdraw && onClickWithdraw(data.asset.id)
|
||||
}
|
||||
>
|
||||
<span>
|
||||
<VegaIcon
|
||||
name={VegaIconNames.WITHDRAW}
|
||||
size={16}
|
||||
/>
|
||||
{t('Withdraw')}
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
key={'breakdown'}
|
||||
data-testid="breakdown"
|
||||
onClick={() => {
|
||||
setOpenBreakdown(!openBreakdown);
|
||||
setRow(data);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<VegaIcon
|
||||
name={VegaIconNames.BREAKDOWN}
|
||||
size={16}
|
||||
/>
|
||||
{t('Breakdown')}
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { forwardRef } from 'react';
|
||||
import { addDecimalsFormatNumber } from '@vegaprotocol/utils';
|
||||
import { t } from '@vegaprotocol/i18n';
|
||||
import {
|
||||
Intent,
|
||||
progressBarCellRendererSelector,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { Intent } from '@vegaprotocol/ui-toolkit';
|
||||
import { AgGridColumn } from 'ag-grid-react';
|
||||
import type { AgGridReact, AgGridReactProps } from 'ag-grid-react';
|
||||
import type { AccountFields } from './accounts-data-provider';
|
||||
import { AccountTypeMapping } from '@vegaprotocol/types';
|
||||
import type { ValueProps } from '@vegaprotocol/ui-toolkit';
|
||||
import type { VegaValueFormatterParams } from '@vegaprotocol/datagrid';
|
||||
import type {
|
||||
ValueProps,
|
||||
VegaValueFormatterParams,
|
||||
} from '@vegaprotocol/datagrid';
|
||||
import { progressBarCellRendererSelector } from '@vegaprotocol/datagrid';
|
||||
import { AgGridDynamic as AgGrid, PriceCell } from '@vegaprotocol/datagrid';
|
||||
import type { ValueFormatterParams } from 'ag-grid-community';
|
||||
import { accountValuesComparator } from './accounts-table';
|
||||
|
||||
@@ -17,3 +17,5 @@ export * from './lib/filters/set-filter';
|
||||
|
||||
export * from './lib/cell-class-rules';
|
||||
export * from './lib/type-helpers';
|
||||
|
||||
export * from './lib/cells/grid-progress-bar';
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
import type { Intent } from '@vegaprotocol/ui-toolkit';
|
||||
import { ProgressBar } from '@vegaprotocol/ui-toolkit';
|
||||
import type {
|
||||
CellRendererSelectorResult,
|
||||
ICellRendererParams,
|
||||
} from 'ag-grid-community';
|
||||
import type { Intent } from '../../utils/intent';
|
||||
import { ProgressBar } from './progress-bar';
|
||||
|
||||
export interface ValueProps {
|
||||
valueFormatted?: {
|
||||
@@ -0,0 +1 @@
|
||||
export * from './use-market-oracle';
|
||||
@@ -0,0 +1,132 @@
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { useMarketOracle } from './use-market-oracle';
|
||||
import type { MarketInfoQuery } from '../components/market-info/__generated__/MarketInfo';
|
||||
import type { Provider } from '@vegaprotocol/oracles';
|
||||
|
||||
const ORACLE_PROOFS_URL = 'ORACLE_PROOFS_URL';
|
||||
|
||||
const address = 'address';
|
||||
const key = 'key';
|
||||
|
||||
const mockEnvironment = jest.fn(() => ({ ORACLE_PROOFS_URL }));
|
||||
const mockDataProvider = jest.fn<
|
||||
{ data: MarketInfoQuery['market'] },
|
||||
unknown[]
|
||||
>(() => ({
|
||||
data: {
|
||||
tradableInstrument: {
|
||||
instrument: {
|
||||
product: {
|
||||
dataSourceSpecForSettlementData: {
|
||||
data: {
|
||||
sourceType: {
|
||||
__typename: 'DataSourceDefinitionExternal',
|
||||
sourceType: {
|
||||
signers: [
|
||||
{
|
||||
signer: {
|
||||
__typename: 'ETHAddress',
|
||||
address,
|
||||
},
|
||||
},
|
||||
{
|
||||
signer: {
|
||||
__typename: 'PubKey',
|
||||
key,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as MarketInfoQuery['market'],
|
||||
}));
|
||||
|
||||
const mockOracleProofs = jest.fn<{ data?: Provider[] }, unknown[]>(() => ({}));
|
||||
|
||||
jest.mock('@vegaprotocol/environment', () => ({
|
||||
useEnvironment: jest.fn((args) => mockEnvironment()),
|
||||
}));
|
||||
|
||||
jest.mock('@vegaprotocol/react-helpers', () => ({
|
||||
useDataProvider: jest.fn((args) => mockDataProvider()),
|
||||
}));
|
||||
|
||||
jest.mock('@vegaprotocol/oracles', () => ({
|
||||
useOracleProofs: jest.fn((args) => mockOracleProofs()),
|
||||
}));
|
||||
|
||||
const marketId = 'marketId';
|
||||
describe('useMarketOracle', () => {
|
||||
it('returns undefined if no market info present', () => {
|
||||
mockDataProvider.mockReturnValueOnce({ data: null });
|
||||
const { result } = renderHook(() => useMarketOracle(marketId));
|
||||
expect(result.current).toBeUndefined();
|
||||
});
|
||||
|
||||
it('returns undefined if no oracle proofs present', () => {
|
||||
mockOracleProofs.mockReturnValueOnce({ data: undefined });
|
||||
const { result } = renderHook(() => useMarketOracle(marketId));
|
||||
expect(result.current).toBeUndefined();
|
||||
});
|
||||
|
||||
it('returns oracle matched by eth_address', () => {
|
||||
const data = [
|
||||
{
|
||||
proofs: [
|
||||
{
|
||||
eth_address: 'eth_address',
|
||||
type: 'eth_address',
|
||||
},
|
||||
],
|
||||
oracle: {},
|
||||
} as Provider,
|
||||
{
|
||||
proofs: [
|
||||
{
|
||||
eth_address: address,
|
||||
type: 'eth_address',
|
||||
},
|
||||
],
|
||||
oracle: {},
|
||||
} as Provider,
|
||||
];
|
||||
mockOracleProofs.mockReturnValueOnce({
|
||||
data,
|
||||
});
|
||||
const { result } = renderHook(() => useMarketOracle(marketId));
|
||||
expect(result.current).toBe(data[1].oracle);
|
||||
});
|
||||
|
||||
it('returns oracle matching by public_key', () => {
|
||||
const data = [
|
||||
{
|
||||
proofs: [
|
||||
{
|
||||
public_key: 'public_key',
|
||||
type: 'public_key',
|
||||
},
|
||||
],
|
||||
oracle: {},
|
||||
} as Provider,
|
||||
{
|
||||
proofs: [
|
||||
{
|
||||
public_key: key,
|
||||
type: 'public_key',
|
||||
},
|
||||
],
|
||||
oracle: {},
|
||||
} as Provider,
|
||||
];
|
||||
mockOracleProofs.mockReturnValueOnce({
|
||||
data,
|
||||
});
|
||||
const { result } = renderHook(() => useMarketOracle(marketId));
|
||||
expect(result.current).toBe(data[1].oracle);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
import { useEnvironment } from '@vegaprotocol/environment';
|
||||
import { useOracleProofs } from '@vegaprotocol/oracles';
|
||||
import { useDataProvider } from '@vegaprotocol/react-helpers';
|
||||
import { marketInfoProvider } from '../components/market-info/market-info-data-provider';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
export const useMarketOracle = (marketId: string) => {
|
||||
const { ORACLE_PROOFS_URL } = useEnvironment();
|
||||
const { data: marketInfo } = useDataProvider({
|
||||
dataProvider: marketInfoProvider,
|
||||
variables: { marketId },
|
||||
});
|
||||
const { data } = useOracleProofs(ORACLE_PROOFS_URL);
|
||||
return useMemo(() => {
|
||||
if (!data || !marketInfo) {
|
||||
return undefined;
|
||||
}
|
||||
const dataSource =
|
||||
marketInfo.tradableInstrument.instrument.product
|
||||
.dataSourceSpecForSettlementData.data;
|
||||
return data.find((provider) =>
|
||||
provider.proofs.some(
|
||||
(proof) =>
|
||||
(proof.type === 'eth_address' &&
|
||||
dataSource.sourceType.__typename ===
|
||||
'DataSourceDefinitionExternal' &&
|
||||
dataSource.sourceType.sourceType.signers?.some(
|
||||
(signer) =>
|
||||
signer.signer.__typename === 'ETHAddress' &&
|
||||
signer.signer.address === proof.eth_address
|
||||
)) ||
|
||||
(proof.type === 'public_key' &&
|
||||
dataSource.sourceType.__typename ===
|
||||
'DataSourceDefinitionExternal' &&
|
||||
dataSource.sourceType.sourceType.signers?.some(
|
||||
(signer) =>
|
||||
signer.signer.__typename === 'PubKey' &&
|
||||
signer.signer.key === proof.public_key
|
||||
))
|
||||
)
|
||||
)?.oracle;
|
||||
}, [data, marketInfo]);
|
||||
};
|
||||
@@ -1 +1,2 @@
|
||||
export * from './components';
|
||||
export * from './hooks';
|
||||
|
||||
@@ -176,14 +176,16 @@ export const MarketListTable = forwardRef<
|
||||
/>
|
||||
<AgGridColumn
|
||||
headerName={t('Settlement asset')}
|
||||
field="tradableInstrument.instrument.product.settlementAsset"
|
||||
field="tradableInstrument.instrument.product.settlementAsset.symbol"
|
||||
cellRenderer={({
|
||||
value,
|
||||
data,
|
||||
}: VegaICellRendererParams<
|
||||
MarketMaybeWithData,
|
||||
'tradableInstrument.instrument.product.settlementAsset'
|
||||
>) =>
|
||||
value ? (
|
||||
'tradableInstrument.instrument.product.settlementAsset.symbol'
|
||||
>) => {
|
||||
const value =
|
||||
data?.tradableInstrument.instrument.product.settlementAsset;
|
||||
return value ? (
|
||||
<ButtonLink
|
||||
onClick={(e) => {
|
||||
openAssetDetailsDialog(value.id, e.target as HTMLElement);
|
||||
@@ -193,8 +195,8 @@ export const MarketListTable = forwardRef<
|
||||
</ButtonLink>
|
||||
) : (
|
||||
''
|
||||
)
|
||||
}
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<AgGridColumn headerName={t('Market ID')} field="id" />
|
||||
</AgGrid>
|
||||
|
||||
@@ -8,6 +8,7 @@ import type {
|
||||
TypedDataAgGrid,
|
||||
VegaICellRendererParams,
|
||||
} from '@vegaprotocol/datagrid';
|
||||
import { ProgressBarCell } from '@vegaprotocol/datagrid';
|
||||
import {
|
||||
AgGridDynamic as AgGrid,
|
||||
DateRangeFilter,
|
||||
@@ -22,7 +23,6 @@ import {
|
||||
TooltipCellComponent,
|
||||
ExternalLink,
|
||||
Icon,
|
||||
ProgressBarCell,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
volumePrefix,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/react-helpers",
|
||||
"version": "0.2.0"
|
||||
"version": "0.2.1"
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"format": ["esm", "cjs"],
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/react-helpers/README.md",
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { useRef } from 'react';
|
||||
import { BrowserTracing } from '@sentry/tracing';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import type { LocalLogger } from '@vegaprotocol/utils';
|
||||
import type { LocalLogger, LoggerConf } from '@vegaprotocol/utils';
|
||||
import { localLoggerFactory } from '@vegaprotocol/utils';
|
||||
|
||||
interface Props {
|
||||
interface Props extends LoggerConf {
|
||||
dsn?: string;
|
||||
application?: string;
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
export const useLogger = ({ dsn, ...props }: Props) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/tailwindcss-config",
|
||||
"version": "0.0.1"
|
||||
"version": "0.0.2"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"build": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"format": ["esm", "cjs"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/tailwindcss-config",
|
||||
"main": "libs/tailwindcss-config/src/index.js",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "@vegaprotocol/ui-toolkit",
|
||||
"version": "0.11.0"
|
||||
"version": "0.11.1"
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"external": ["react/jsx-runtime"],
|
||||
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
|
||||
"compiler": "babel",
|
||||
"format": ["esm", "cjs"],
|
||||
"assets": [
|
||||
{
|
||||
"glob": "libs/ui-toolkit/README.md",
|
||||
|
||||
@@ -57,7 +57,7 @@ export const Checkbox = ({
|
||||
</CheckboxPrimitive.Root>
|
||||
<label
|
||||
htmlFor={name}
|
||||
className={classNames('text-sm', {
|
||||
className={classNames('text-sm flex-1', {
|
||||
'dark:text-neutral-400 text-neutral-600': disabled,
|
||||
})}
|
||||
>
|
||||
|
||||
@@ -62,7 +62,7 @@ export function Dialog({
|
||||
<DialogPrimitives.Root open={open} onOpenChange={(x) => onChange?.(x)}>
|
||||
<DialogPrimitives.Portal>
|
||||
<DialogPrimitives.Overlay
|
||||
className="fixed inset-0 bg-black/50 z-20"
|
||||
className="fixed inset-0 dark:bg-black/80 bg-black/50 z-20"
|
||||
data-testid="dialog-overlay"
|
||||
/>
|
||||
<DialogPrimitives.Content
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
||||
import classNames from 'classnames';
|
||||
import { forwardRef } from 'react';
|
||||
import { Icon } from '../icon';
|
||||
|
||||
/**
|
||||
* The button that toggles the dropdown menu inside grids.
|
||||
* By default, the {@link DropdownMenuContent} will position itself against the trigger.
|
||||
*/
|
||||
export const DropdownMenuGridTrigger = forwardRef<
|
||||
React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,
|
||||
React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>
|
||||
>(({ className, children, ...props }, forwardedRef) => {
|
||||
const triggerClasses = classNames(
|
||||
className,
|
||||
'hover:bg-neutral-500/20 dark:hover:bg-neutral-500/40',
|
||||
'p-0.5 mr-2 focus:rounded-full hover:rounded-full'
|
||||
);
|
||||
return (
|
||||
<DropdownMenuPrimitive.Trigger
|
||||
asChild={true}
|
||||
ref={forwardedRef}
|
||||
className={triggerClasses}
|
||||
{...props}
|
||||
>
|
||||
<button>
|
||||
<Icon name="more" size={4} />
|
||||
</button>
|
||||
</DropdownMenuPrimitive.Trigger>
|
||||
);
|
||||
});
|
||||
@@ -7,8 +7,8 @@ import { Icon } from '../icon';
|
||||
const itemClass = classNames(
|
||||
'relative flex items-center justify-between rounded-sm p-2 text-sm',
|
||||
'cursor-default hover:cursor-pointer',
|
||||
'hover:bg-white dark:hover:bg-neutral-200',
|
||||
'focus:bg-white dark:focus:bg-neutral-200',
|
||||
'hover:bg-white dark:hover:bg-neutral-500',
|
||||
'focus:bg-white dark:focus:bg-neutral-500',
|
||||
'select-none',
|
||||
'whitespace-nowrap'
|
||||
);
|
||||
@@ -42,7 +42,7 @@ export const DropdownMenuTrigger = forwardRef<
|
||||
const triggerClasses = classNames(
|
||||
className,
|
||||
'text-sm py-1 px-2 rounded bg-transparent border border-neutral-500 whitespace-nowrap',
|
||||
'hover:bg-neutral-500/20 dark:hover:bg-neutral-500/40'
|
||||
'dark:hover:bg-neutral-500/20 hover:bg-neutral-500/40'
|
||||
);
|
||||
return (
|
||||
<DropdownMenuPrimitive.Trigger
|
||||
@@ -73,7 +73,7 @@ export const DropdownMenuContent = forwardRef<
|
||||
<DropdownMenuPrimitive.Content
|
||||
{...contentProps}
|
||||
ref={forwardedRef}
|
||||
className="min-w-[290px] bg-neutral-200 dark:bg-white p-2 rounded z-20 dark:text-black"
|
||||
className="min-w-[290px] bg-neutral-100 dark:bg-neutral-900 p-2 rounded z-20 text-black dark:text-white dark:border-neutral-700 border border-neutral-300"
|
||||
align="start"
|
||||
sideOffset={10}
|
||||
/>
|
||||
@@ -115,9 +115,9 @@ export const DropdownMenuRadioItem = forwardRef<
|
||||
React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
||||
inset?: boolean;
|
||||
}
|
||||
>(({ className, inset = false, ...radioItemprops }, forwardedRef) => (
|
||||
>(({ className, inset = false, ...radioItemProps }, forwardedRef) => (
|
||||
<DropdownMenuPrimitive.RadioItem
|
||||
{...radioItemprops}
|
||||
{...radioItemProps}
|
||||
ref={forwardedRef}
|
||||
className={classNames(itemClass, className)}
|
||||
/>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from './dropdown-menu';
|
||||
export * from './dropdown-menu-grid';
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ export const Icon = ({ size = 4, name, className, ariaLabel }: IconProps) => {
|
||||
'inline-block',
|
||||
'fill-current',
|
||||
'align-text-bottom',
|
||||
'fill-current',
|
||||
'shrink-0',
|
||||
// Cant just concatenate as TW wont pick up that the class is being used
|
||||
// so below syntax is required
|
||||
@@ -0,0 +1 @@
|
||||
export * from './icon';
|
||||
@@ -1 +1,2 @@
|
||||
export * from './icon';
|
||||
export * from './blueprint-icons';
|
||||
export * from './vega-icons';
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './vega-icon';
|
||||
export * from './vega-icon.stories';
|
||||
export * from './vega-icon-record';
|
||||
@@ -0,0 +1,29 @@
|
||||
export const IconBreakdown = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<circle cx="8" cy="8" r="6.5" stroke="white" />
|
||||
<rect
|
||||
x="8.5"
|
||||
y="11"
|
||||
width="1"
|
||||
height="4"
|
||||
transform="rotate(-180 8.5 11)"
|
||||
fill="white"
|
||||
/>
|
||||
<rect
|
||||
x="8.5"
|
||||
y="6"
|
||||
width="1"
|
||||
height="1"
|
||||
transform="rotate(-180 8.5 6)"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
export const IconCopy = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M4.47021 1.46997H14.5302V11.53H12.5002V10.47H13.4702V2.52997H5.53021V3.49997H4.47021V1.46997ZM1.47021 4.46997H11.5302V14.53H1.47021V4.46997ZM2.53021 5.52997V13.47H10.4702V5.52997H2.53021Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
export const IconDeposit = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<rect x="4" y="13" width="8" height="1" fill="white" />
|
||||
<path
|
||||
d="M8.52977 8.72048L11.625 5.62524L12.3745 6.37478L7.99977 10.7495L3.625 6.37478L4.37453 5.62524L7.46977 8.72048V2H8.52977V8.72048Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
export const IconEdit = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M2.31 10.44L1.5 14.5L5.56 13.69L14.5 4.75L11.25 1.5V1.51L9.97784 2.78074L9.97356 2.77646L9.26645 3.48357L9.27033 3.48745L2.31 10.44ZM11.25 2.92L13.08 4.75L12.5135 5.31645L10.6835 3.48645L11.25 2.92ZM9.97644 4.19356L11.8064 6.02356L6.02355 11.8064L4.19355 9.97645L9.97644 4.19356ZM5.31644 12.5136L5.07 12.76L2.78 13.22L3.24 10.93L3.48644 10.6836L5.31644 12.5136Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
export const IconForum = ({ size = 24 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M8.20755 15.7736H6V4H8.20755V15.7736ZM10.4151 17.8585V15.7736H8.20755V17.9811H10.4151V20.066H12.6226V17.9811H14.8302V15.7736H12.6226V17.8585H10.4151ZM16.7925 13.566H14.5849V4H16.7925V13.566ZM16.7925 13.566H19V15.7736H16.7925V13.566Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
export const IconGlobe = ({ size = 24 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M11.9946 3C10.2165 3.00106 8.47842 3.52883 6.99987 4.51677C5.51983 5.5057 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C21 9.61305 20.0518 7.32386 18.364 5.63604C16.6761 3.94821 14.3869 3 12 3C12.0001 3 11.9999 3 12 3M11.9959 3.936C11.9972 3.936 11.9985 3.936 11.9999 3.936C13.2976 3.93617 14.3772 5.83592 14.9515 8.22998H9.04712C9.62068 5.83664 10.6991 3.93971 11.9959 3.936ZM9.8073 4.24157C9.05208 5.16925 8.44481 6.56185 8.07534 8.22998H4.87438C5.24741 7.52551 5.72602 6.87397 6.3 6.3C7.28288 5.31711 8.49319 4.61388 9.8073 4.24157ZM4.42885 9.22998C4.10667 10.1091 3.93685 11.0458 3.936 12C3.936 12.9499 4.10378 13.8872 4.42669 14.77H7.88922C7.75324 13.8973 7.67969 12.9663 7.67969 12C7.67969 11.0336 7.7527 10.1027 7.8879 9.22998H4.42885ZM4.87153 15.77C5.00006 16.013 5.14133 16.2501 5.29503 16.4801C6.18112 17.8062 7.44054 18.8398 8.91404 19.4502C9.20977 19.5727 9.51146 19.677 9.81744 19.763C9.06048 18.8354 8.44956 17.4409 8.07765 15.77H4.87153ZM14.1834 19.7628C15.5101 19.3896 16.7227 18.6815 17.7021 17.7021C18.2744 17.1298 18.7541 16.4778 19.1285 15.77H15.9224C15.5508 17.4416 14.9402 18.8355 14.1834 19.7628ZM19.5733 14.77C19.7153 14.3819 19.8278 13.9819 19.9091 13.5732C20.1981 12.12 20.0808 10.6174 19.5733 9.22998H16.1106C16.2463 10.1024 16.3197 11.0333 16.3197 12C16.3197 12.9667 16.2463 13.8976 16.1106 14.77H19.5733ZM19.1285 8.22998C18.5047 7.05058 17.596 6.04063 16.4801 5.29503C15.7711 4.82129 14.9955 4.46564 14.1834 4.23723C14.9402 5.16453 15.5508 6.55844 15.9224 8.22998H19.1285ZM8.60129 12C8.60129 11.0806 8.68603 10.1352 8.84194 9.22998H15.1569C15.3132 10.1358 15.3981 11.0814 15.3981 12C15.3981 12.9186 15.314 13.8642 15.1588 14.77H8.84003C8.68519 13.8648 8.60129 12.9194 8.60129 12ZM11.9997 20.064C10.6916 20.064 9.61486 18.1657 9.04394 15.77H14.9547C14.3836 18.1642 13.3072 20.064 11.9997 20.064Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
export const IconLinkedIn = ({ size = 24 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M21 4.32353V19.6765C21 20.0275 20.8606 20.3641 20.6123 20.6123C20.3641 20.8606 20.0275 21 19.6765 21H4.32353C3.97251 21 3.63586 20.8606 3.38765 20.6123C3.13944 20.3641 3 20.0275 3 19.6765V4.32353C3 3.97251 3.13944 3.63586 3.38765 3.38765C3.63586 3.13944 3.97251 3 4.32353 3H19.6765C20.0275 3 20.3641 3.13944 20.6123 3.38765C20.8606 3.63586 21 3.97251 21 4.32353V4.32353ZM8.29412 9.88235H5.64706V18.3529H8.29412V9.88235ZM8.53235 6.97059C8.53375 6.77036 8.49569 6.57182 8.42035 6.3863C8.34502 6.20078 8.23387 6.03191 8.09328 5.88935C7.95268 5.74678 7.78537 5.6333 7.60091 5.5554C7.41646 5.47749 7.21846 5.43668 7.01824 5.43529H6.97059C6.5634 5.43529 6.1729 5.59705 5.88497 5.88497C5.59705 6.1729 5.43529 6.5634 5.43529 6.97059C5.43529 7.37777 5.59705 7.76828 5.88497 8.05621C6.1729 8.34413 6.5634 8.50588 6.97059 8.50588V8.50588C7.17083 8.51081 7.37008 8.47623 7.55696 8.40413C7.74383 8.33202 7.91467 8.2238 8.0597 8.08565C8.20474 7.94749 8.32113 7.78212 8.40223 7.59897C8.48333 7.41582 8.52755 7.21848 8.53235 7.01824V6.97059ZM18.3529 13.2071C18.3529 10.6606 16.7329 9.67059 15.1235 9.67059C14.5966 9.6442 14.0719 9.75644 13.6019 9.9961C13.1318 10.2358 12.7328 10.5945 12.4447 11.0365H12.3706V9.88235H9.88235V18.3529H12.5294V13.8476C12.4911 13.3862 12.6365 12.9283 12.9339 12.5735C13.2313 12.2186 13.6567 11.9954 14.1176 11.9524H14.2182C15.06 11.9524 15.6847 12.4818 15.6847 13.8159V18.3529H18.3318L18.3529 13.2071Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
export const IconMoon = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M8 1C4.13 1 1 4.13 1 8C1 11.87 4.13 15 8 15C11.87 15 15 11.87 15 8C15 4.13 11.87 1 8 1ZM8.66 12.44H7.32V11.1H8.66V12.44ZM10.38 6.78C10.29 7.01 10.18 7.2 10.05 7.36C9.92 7.52 9.75 7.7 9.53 7.91C9.3 8.14 9.11 8.34 8.98 8.51C8.85 8.68 8.73 8.89 8.64 9.14C8.55 9.37 8.51 9.65 8.51 9.96V10.04V10.13H7.3V10.04C7.3 9.61 7.36 9.24 7.47 8.92C7.58 8.61 7.71 8.34 7.87 8.13C8.03 7.92 8.22 7.69 8.47 7.43C8.75 7.13 8.96 6.87 9.09 6.66C9.22 6.46 9.28 6.2 9.28 5.88C9.28 5.47 9.16 5.16 8.93 4.93C8.7 4.7 8.38 4.58 7.96 4.58C7.6 4.58 7.28 4.68 7.01 4.89C6.75 5.09 6.56 5.44 6.45 5.96C6.34 6.48 6.43 6.06 6.43 6.06L5.26 5.62L5.28 5.54C5.47 4.87 5.81 4.35 6.29 4.02C6.77 3.69 7.34 3.53 8 3.53C8.75 3.53 9.37 3.75 9.82 4.18C10.28 4.62 10.5 5.22 10.5 5.97C10.5 6.27 10.46 6.53 10.37 6.76L10.38 6.78Z"
|
||||
fill="white"
|
||||
/>
|
||||
<circle cx="8" cy="8" r="7" fill="white" />
|
||||
<path
|
||||
d="M6.15393 5.69232C6.15393 5.10304 6.24054 4.5075 6.46161 4C4.99179 4.63982 4 6.14089 4 7.84607C4 10.1402 5.85982 12 8.15393 12C9.85911 12 11.3602 11.0082 12 9.53839C11.4925 9.75946 10.8964 9.84607 10.3077 9.84607C8.01357 9.84607 6.15393 7.98643 6.15393 5.69232Z"
|
||||
fill="black"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
export const IconOpenExternal = ({ size = 24 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M10.9605 4.28998H3.76002V3.22998H12.77V12.24H11.71V5.03952L4.13479 12.6148L3.38525 11.8652L10.9605 4.28998Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
export const IconQuestionMark = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M8 1C4.13 1 1 4.13 1 8C1 11.87 4.13 15 8 15C11.87 15 15 11.87 15 8C15 4.13 11.87 1 8 1ZM8.66 12.44H7.32V11.1H8.66V12.44ZM10.38 6.78C10.29 7.01 10.18 7.2 10.05 7.36C9.92 7.52 9.75 7.7 9.53 7.91C9.3 8.14 9.11 8.34 8.98 8.51C8.85 8.68 8.73 8.89 8.64 9.14C8.55 9.37 8.51 9.65 8.51 9.96V10.04V10.13H7.3V10.04C7.3 9.61 7.36 9.24 7.47 8.92C7.58 8.61 7.71 8.34 7.87 8.13C8.03 7.92 8.22 7.69 8.47 7.43C8.75 7.13 8.96 6.87 9.09 6.66C9.22 6.46 9.28 6.2 9.28 5.88C9.28 5.47 9.16 5.16 8.93 4.93C8.7 4.7 8.38 4.58 7.96 4.58C7.6 4.58 7.28 4.68 7.01 4.89C6.75 5.09 6.56 5.44 6.45 5.96L6.43 6.06L5.26 5.62L5.28 5.54C5.47 4.87 5.81 4.35 6.29 4.02C6.77 3.69 7.34 3.53 8 3.53C8.75 3.53 9.37 3.75 9.82 4.18C10.28 4.62 10.5 5.22 10.5 5.97C10.5 6.27 10.46 6.53 10.37 6.76L10.38 6.78Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
export const IconTransfer = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M3.27952 5.90477L5.37476 8L4.62522 8.74953L1.25046 5.37477L4.62522 2L5.37476 2.74953L3.27952 4.84477L9 4.84477L9 5.90477L3.27952 5.90477Z"
|
||||
fill="white"
|
||||
/>
|
||||
<path
|
||||
d="M12.7205 10.0952L10.6252 8L11.3748 7.25047L14.7495 10.6252L11.3748 14L10.6252 13.2505L12.7205 11.1552L7 11.1552L7 10.0952L12.7205 10.0952Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
export const IconTwitter = ({ size = 24 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M8.28743 20.2575C15.8423 20.2575 19.9641 14 19.9641 8.58084C19.9641 8.4012 19.9641 8.22156 19.9541 8.0519C20.7525 7.47305 21.4511 6.74451 22 5.92615C21.2615 6.25549 20.4731 6.47505 19.6447 6.57485C20.493 6.06587 21.1417 5.26747 21.4511 4.2994C20.6627 4.76846 19.7844 5.10778 18.8463 5.29741C18.0978 4.499 17.0299 4 15.8523 4C13.5868 4 11.7505 5.83633 11.7505 8.1018C11.7505 8.42116 11.7904 8.74052 11.8603 9.03992C8.43713 8.86028 5.40319 7.22355 3.38723 4.7485C3.02794 5.34731 2.82834 6.05589 2.82834 6.80439C2.82834 8.23154 3.55689 9.48902 4.65469 10.2176C3.97605 10.2076 3.34731 10.018 2.7984 9.70858C2.7984 9.72854 2.7984 9.73852 2.7984 9.75848C2.7984 11.7445 4.21557 13.4112 6.09182 13.7804C5.74251 13.8703 5.38323 13.9202 5.01397 13.9202C4.75449 13.9202 4.49501 13.8902 4.24551 13.8503C4.76447 15.477 6.28144 16.6647 8.07784 16.7046C6.67066 17.8024 4.90419 18.4611 2.97804 18.4611C2.6487 18.4611 2.31936 18.4411 2 18.4012C3.80639 19.5788 5.96208 20.2575 8.28743 20.2575Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
export const IconWithdraw = ({ size = 16 }: { size: number }) => {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M7.47023 4.0291L4.375 7.12433L3.62547 6.37479L8.00023 2.00003L12.375 6.3748L11.6255 7.12433L8.53023 4.0291L8.53023 10.7496L7.47023 10.7496L7.47023 4.0291Z"
|
||||
fill="white"
|
||||
/>
|
||||
<rect x="4" y="13" width="8" height="1" fill="white" />
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
import { IconBreakdown } from './svg-icons/icon-breakdown';
|
||||
import { IconCopy } from './svg-icons/icon-copy';
|
||||
import { IconDeposit } from './svg-icons/icon-deposit';
|
||||
import { IconWithdraw } from './svg-icons/icon-withdraw';
|
||||
import { IconTransfer } from './svg-icons/icon-transfer';
|
||||
import { IconEdit } from './svg-icons/icon-edit';
|
||||
import { IconMoon } from './svg-icons/icon-moon';
|
||||
import { IconGlobe } from './svg-icons/icon-globe';
|
||||
import { IconLinkedIn } from './svg-icons/icon-linkedin';
|
||||
import { IconTwitter } from './svg-icons/icon-twitter';
|
||||
import { IconQuestionMark } from './svg-icons/icon-question-mark';
|
||||
import { IconForum } from './svg-icons/icon-forum';
|
||||
import { IconOpenExternal } from './svg-icons/icon-open-external';
|
||||
|
||||
export enum VegaIconNames {
|
||||
BREAKDOWN = 'breakdown',
|
||||
COPY = 'copy',
|
||||
DEPOSIT = 'deposit',
|
||||
WITHDRAW = 'withdraw',
|
||||
EDIT = 'edit',
|
||||
TRANSFER = 'transfer',
|
||||
FORUM = 'forum',
|
||||
GLOBE = 'globe',
|
||||
LINKEDIN = 'linkedin',
|
||||
TWITTER = 'twitter',
|
||||
MOON = 'moon',
|
||||
OPEN_EXTERNAL = 'open-external',
|
||||
QUESTION_MARK = 'question-mark',
|
||||
}
|
||||
|
||||
export const VegaIconNameMap: Record<
|
||||
VegaIconNames,
|
||||
({ size }: { size: number }) => JSX.Element
|
||||
> = {
|
||||
breakdown: IconBreakdown,
|
||||
copy: IconCopy,
|
||||
deposit: IconDeposit,
|
||||
withdraw: IconWithdraw,
|
||||
transfer: IconTransfer,
|
||||
edit: IconEdit,
|
||||
moon: IconMoon,
|
||||
globe: IconGlobe,
|
||||
linkedin: IconLinkedIn,
|
||||
twitter: IconTwitter,
|
||||
'question-mark': IconQuestionMark,
|
||||
forum: IconForum,
|
||||
'open-external': IconOpenExternal,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import { VegaIcon } from './vega-icon';
|
||||
import { VegaIconNames } from './vega-icon-record';
|
||||
|
||||
describe('VegaIcon', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(<VegaIcon name={VegaIconNames.TWITTER} />);
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Story, Meta } from '@storybook/react';
|
||||
import type { VegaIconProps } from './vega-icon';
|
||||
import { VegaIcon } from './vega-icon';
|
||||
import { VegaIconNames } from './vega-icon-record';
|
||||
|
||||
export default {
|
||||
component: VegaIcon,
|
||||
title: 'VegaIcon',
|
||||
} as Meta;
|
||||
|
||||
const Template: Story<VegaIconProps> = (args) => <VegaIcon {...args} />;
|
||||
|
||||
export const Small = Template.bind({});
|
||||
Small.args = {
|
||||
name: VegaIconNames.BREAKDOWN,
|
||||
};
|
||||
|
||||
export const Bigger = Template.bind({});
|
||||
Bigger.args = {
|
||||
name: VegaIconNames.DEPOSIT,
|
||||
size: 24,
|
||||
};
|
||||
|
||||
export const EvenBigger = Template.bind({});
|
||||
EvenBigger.args = {
|
||||
name: VegaIconNames.GLOBE,
|
||||
size: 32,
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { VegaIconNames } from './vega-icon-record';
|
||||
import { VegaIconNameMap } from './vega-icon-record';
|
||||
|
||||
export interface VegaIconProps {
|
||||
name: VegaIconNames;
|
||||
size?: 16 | 24 | 32;
|
||||
}
|
||||
|
||||
export const VegaIcon = ({ size = 16, name }: VegaIconProps) => {
|
||||
const effectiveClassName = classNames(
|
||||
'inline-block',
|
||||
'fill-current',
|
||||
'align-text-bottom',
|
||||
'fill-current',
|
||||
'shrink-0',
|
||||
'pr-1'
|
||||
);
|
||||
const Element = VegaIconNameMap[name];
|
||||
return (
|
||||
<span className={effectiveClassName}>
|
||||
<Element size={size} />
|
||||
</span>
|
||||
);
|
||||
};
|
||||
@@ -12,6 +12,7 @@ export * from './dialog';
|
||||
export * from './drawer';
|
||||
export * from './dropdown-menu';
|
||||
export * from './form-group';
|
||||
export * from './healthbar';
|
||||
export * from './icon';
|
||||
export * from './indicator';
|
||||
export * from './input-error';
|
||||
@@ -25,11 +26,11 @@ export * from './nav-dropdown';
|
||||
export * from './nav';
|
||||
export * from './navigation';
|
||||
export * from './notification';
|
||||
export * from './notification-banner';
|
||||
export * from './pagination';
|
||||
export * from './popover';
|
||||
export * from './progress-bar';
|
||||
export * from './radio-group';
|
||||
export * from './resizable-grid';
|
||||
export * from './rounded-wrapper';
|
||||
export * from './select';
|
||||
export * from './simple-grid';
|
||||
@@ -49,4 +50,3 @@ export * from './traffic-light';
|
||||
export * from './vega-icons';
|
||||
export * from './vega-logo';
|
||||
export * from './viewing-as-user';
|
||||
export * from './healthbar';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from './notification-banner';
|
||||
@@ -0,0 +1,45 @@
|
||||
/* eslint-disable jsx-a11y/accessible-emoji */
|
||||
import type { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { Intent } from '../../utils/intent';
|
||||
import { NotificationBanner } from './notification-banner';
|
||||
import { Button } from '../button';
|
||||
|
||||
export default {
|
||||
title: 'NotificationBanner',
|
||||
component: NotificationBanner,
|
||||
} as ComponentMeta<typeof NotificationBanner>;
|
||||
|
||||
const Template: ComponentStory<typeof NotificationBanner> = (args) => {
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<NotificationBanner
|
||||
intent={Intent.Warning}
|
||||
onClose={() => {
|
||||
return;
|
||||
}}
|
||||
>
|
||||
<div className="uppercase ">
|
||||
The network will upgrade to v0.68.5 in{' '}
|
||||
<span className="text-vega-orange-500">9234</span> blocks
|
||||
</div>
|
||||
<div>
|
||||
Trading activity will be interrupted, manage your risk appropriately.
|
||||
<a href="/">View details</a>
|
||||
</div>
|
||||
</NotificationBanner>
|
||||
<NotificationBanner intent={Intent.Danger}>
|
||||
The oracle for this market has been flagged as malicious by the
|
||||
community.
|
||||
</NotificationBanner>
|
||||
<NotificationBanner>
|
||||
Viewing as Vega user 0592X...20CKZ
|
||||
<Button size="sm" className="ml-2">
|
||||
Exit view as
|
||||
</Button>
|
||||
</NotificationBanner>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.args = {};
|
||||
@@ -0,0 +1,80 @@
|
||||
import classNames from 'classnames';
|
||||
import { toastIconMapping } from '../toast';
|
||||
import { Intent } from '../../utils/intent';
|
||||
import { Icon } from '../icon';
|
||||
|
||||
interface NotificationBannerProps {
|
||||
intent?: Intent;
|
||||
children?: React.ReactNode;
|
||||
onClose?: () => void;
|
||||
}
|
||||
|
||||
export const NotificationBanner = ({
|
||||
intent = Intent.None,
|
||||
children,
|
||||
onClose,
|
||||
}: NotificationBannerProps) => {
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
'flex items-center p-3 border-b min-h-[56px]',
|
||||
'text-[12px] leading-[16px] font-normal',
|
||||
{
|
||||
'bg-vega-light-100 dark:bg-vega-dark-100 ': intent === Intent.None,
|
||||
'bg-vega-blue-300 dark:bg-vega-blue-700': intent === Intent.Primary,
|
||||
'bg-vega-green-300 dark:bg-vega-green-700': intent === Intent.Success,
|
||||
'bg-vega-orange-300 dark:bg-vega-orange-700':
|
||||
intent === Intent.Warning,
|
||||
'bg-vega-pink-300 dark:bg-vega-pink-700': intent === Intent.Danger,
|
||||
},
|
||||
{
|
||||
'border-b-vega-light-200 dark:border-b-vega-dark-200 ':
|
||||
intent === Intent.None,
|
||||
|
||||
'border-b-vega-blue-500 dark:border-b-vega-blue-500':
|
||||
intent === Intent.Primary,
|
||||
|
||||
'border-b-vega-green-600 dark:border-b-vega-green-500':
|
||||
intent === Intent.Success,
|
||||
|
||||
'border-b-vega-orange-500 dark:border-b-vega-orange-500':
|
||||
intent === Intent.Warning,
|
||||
|
||||
'border-b-vega-pink-500 dark:border-b-vega-pink-500':
|
||||
intent === Intent.Danger,
|
||||
}
|
||||
)}
|
||||
>
|
||||
{intent === Intent.None ? null : (
|
||||
<Icon
|
||||
name={toastIconMapping[intent]}
|
||||
size={4}
|
||||
className={classNames('mr-2', {
|
||||
'text-vega-blue-500 dark:text-vega-blue-500':
|
||||
intent === Intent.Primary,
|
||||
|
||||
'text-vega-green-600 dark:text-vega-green-500':
|
||||
intent === Intent.Success,
|
||||
|
||||
'text-vega-orange-500 dark:text-vega-orange-500':
|
||||
intent === Intent.Warning,
|
||||
|
||||
'text-vega-pink-500 dark:text-vega-pink-500':
|
||||
intent === Intent.Danger,
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
<div className="grow">{children}</div>
|
||||
{onClose ? (
|
||||
<button
|
||||
type="button"
|
||||
data-testid="notification-banner-close"
|
||||
onClick={onClose}
|
||||
className="ml-2"
|
||||
>
|
||||
<Icon name="cross" size={4} className="dark:text-white" />
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,2 +1 @@
|
||||
export * from './grid-progress-bar';
|
||||
export * from './progress-bar';
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import type { Story, Meta } from '@storybook/react';
|
||||
import { ResizableGrid } from './resizable-grid';
|
||||
import { Allotment } from 'allotment';
|
||||
import 'allotment/dist/style.css';
|
||||
|
||||
export default {
|
||||
component: ResizableGrid,
|
||||
title: 'ResizablePanel',
|
||||
} as Meta;
|
||||
|
||||
const Template: Story = (args) => (
|
||||
<div className="h-48">
|
||||
<ResizableGrid vertical={true}>
|
||||
<Allotment.Pane minSize={20}>
|
||||
<div>Panel 1</div>
|
||||
</Allotment.Pane>
|
||||
<Allotment.Pane minSize={20}>
|
||||
<div>Panel 2</div>
|
||||
</Allotment.Pane>
|
||||
</ResizableGrid>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const Default = Template.bind({});
|
||||
@@ -30,7 +30,7 @@ type ToastProps = Toast & {
|
||||
state?: ToastState;
|
||||
};
|
||||
|
||||
const toastIconMapping: { [i in Intent]: IconName } = {
|
||||
export const toastIconMapping: { [i in Intent]: IconName } = {
|
||||
[Intent.None]: IconNames.HELP,
|
||||
[Intent.Primary]: IconNames.INFO_SIGN,
|
||||
[Intent.Success]: IconNames.TICK_CIRCLE,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@vegaprotocol/utils",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"build": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"format": ["esm", "cjs"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/utils",
|
||||
"main": "libs/utils/src/index.ts",
|
||||
|
||||
@@ -21,7 +21,7 @@ type ConsoleMethod = {
|
||||
}[keyof Console] &
|
||||
string;
|
||||
|
||||
interface LoggerConf {
|
||||
export interface LoggerConf {
|
||||
application?: string;
|
||||
tags?: string[];
|
||||
logLevel?: LogLevelsType;
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
"autoprefixer": "10.4.8",
|
||||
"babel-jest": "27.5.1",
|
||||
"babel-loader": "8.1.0",
|
||||
"cypress-mochawesome-reporter": "^3.3.0",
|
||||
"cypress": "^12.9.0",
|
||||
"cypress-real-events": "^1.7.6",
|
||||
"dotenv": "^16.0.1",
|
||||
|
||||
@@ -11757,6 +11757,16 @@ cyclist@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
|
||||
integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==
|
||||
|
||||
cypress-mochawesome-reporter@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/cypress-mochawesome-reporter/-/cypress-mochawesome-reporter-3.3.0.tgz#cfcd07bd15b4773917f2b2a240178c7cdb310a51"
|
||||
integrity sha512-X4HU1JpuB62MXLh46660KmIs/L6noWV2KpxaXPDorz1zwgj26NN+BPCLP80D9cCFUwX3hNH0pKFZDwVR7vM8wg==
|
||||
dependencies:
|
||||
fs-extra "^10.0.1"
|
||||
mochawesome "^7.1.3"
|
||||
mochawesome-merge "^4.2.1"
|
||||
mochawesome-report-generator "^6.2.0"
|
||||
|
||||
cypress-real-events@^1.7.6:
|
||||
version "1.7.6"
|
||||
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.7.6.tgz#6f17e0b2ceea1d6dc60f6737d8f84cc517bbbb4c"
|
||||
@@ -12040,6 +12050,11 @@ date-fns@^2.17.0, date-fns@^2.28.0:
|
||||
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8"
|
||||
integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==
|
||||
|
||||
dateformat@^4.5.1:
|
||||
version "4.6.3"
|
||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5"
|
||||
integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==
|
||||
|
||||
dayjs@^1.10.4:
|
||||
version "1.11.5"
|
||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93"
|
||||
@@ -12883,7 +12898,7 @@ escape-goat@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
|
||||
integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
|
||||
|
||||
escape-html@~1.0.3:
|
||||
escape-html@^1.0.3, escape-html@~1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
|
||||
@@ -14129,7 +14144,7 @@ fs-constants@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
||||
|
||||
fs-extra@^10.0.0, fs-extra@^10.1.0:
|
||||
fs-extra@^10.0.0, fs-extra@^10.0.1, fs-extra@^10.1.0:
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
|
||||
integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
|
||||
@@ -14138,6 +14153,15 @@ fs-extra@^10.0.0, fs-extra@^10.1.0:
|
||||
jsonfile "^6.0.1"
|
||||
universalify "^2.0.0"
|
||||
|
||||
fs-extra@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
||||
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-extra@^8.1, fs-extra@^8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
|
||||
@@ -14197,6 +14221,11 @@ fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2:
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
fsu@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fsu/-/fsu-1.1.1.tgz#bd36d3579907c59d85b257a75b836aa9e0c31834"
|
||||
integrity sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
@@ -17460,11 +17489,21 @@ lodash.isboolean@^3.0.3:
|
||||
resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6"
|
||||
integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==
|
||||
|
||||
lodash.isempty@^4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e"
|
||||
integrity sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==
|
||||
|
||||
lodash.isequal@4.5.0, lodash.isequal@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
|
||||
integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==
|
||||
|
||||
lodash.isfunction@^3.0.9:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051"
|
||||
integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==
|
||||
|
||||
lodash.isinteger@^4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343"
|
||||
@@ -17475,6 +17514,11 @@ lodash.isnumber@^3.0.3:
|
||||
resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc"
|
||||
integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==
|
||||
|
||||
lodash.isobject@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
|
||||
integrity sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA==
|
||||
|
||||
lodash.isplainobject@^4.0.6:
|
||||
version "4.0.6"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
|
||||
@@ -18420,6 +18464,49 @@ mocha@^10.2.0:
|
||||
yargs-parser "20.2.4"
|
||||
yargs-unparser "2.0.0"
|
||||
|
||||
mochawesome-merge@^4.2.1:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/mochawesome-merge/-/mochawesome-merge-4.3.0.tgz#7cc5d5730c7d8d1b034c8d8fecf3cd36e0010297"
|
||||
integrity sha512-1roR6g+VUlfdaRmL8dCiVpKiaUhbPVm1ZQYUM6zHX46mWk+tpsKVZR6ba98k2zc8nlPvYd71yn5gyH970pKBSw==
|
||||
dependencies:
|
||||
fs-extra "^7.0.1"
|
||||
glob "^7.1.6"
|
||||
yargs "^15.3.1"
|
||||
|
||||
mochawesome-report-generator@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz#65a30a11235ba7a68e1cf0ca1df80d764b93ae78"
|
||||
integrity sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==
|
||||
dependencies:
|
||||
chalk "^4.1.2"
|
||||
dateformat "^4.5.1"
|
||||
escape-html "^1.0.3"
|
||||
fs-extra "^10.0.0"
|
||||
fsu "^1.1.1"
|
||||
lodash.isfunction "^3.0.9"
|
||||
opener "^1.5.2"
|
||||
prop-types "^15.7.2"
|
||||
tcomb "^3.2.17"
|
||||
tcomb-validation "^3.3.0"
|
||||
validator "^13.6.0"
|
||||
yargs "^17.2.1"
|
||||
|
||||
mochawesome@^7.1.3:
|
||||
version "7.1.3"
|
||||
resolved "https://registry.yarnpkg.com/mochawesome/-/mochawesome-7.1.3.tgz#07b358138f37f5b07b51a1b255d84babfa36fa83"
|
||||
integrity sha512-Vkb3jR5GZ1cXohMQQ73H3cZz7RoxGjjUo0G5hu0jLaW+0FdUxUwg3Cj29bqQdh0rFcnyV06pWmqmi5eBPnEuNQ==
|
||||
dependencies:
|
||||
chalk "^4.1.2"
|
||||
diff "^5.0.0"
|
||||
json-stringify-safe "^5.0.1"
|
||||
lodash.isempty "^4.4.0"
|
||||
lodash.isfunction "^3.0.9"
|
||||
lodash.isobject "^3.0.2"
|
||||
lodash.isstring "^4.0.1"
|
||||
mochawesome-report-generator "^6.2.0"
|
||||
strip-ansi "^6.0.1"
|
||||
uuid "^8.3.2"
|
||||
|
||||
mock-apollo-client@^1.2.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/mock-apollo-client/-/mock-apollo-client-1.2.1.tgz#e3bfdc3ff73b1fea28fa7e91ec82e43ba8cbfa39"
|
||||
@@ -19046,7 +19133,7 @@ open@^8.0.9, open@^8.4.0:
|
||||
is-docker "^2.1.1"
|
||||
is-wsl "^2.2.0"
|
||||
|
||||
opener@^1.5.1:
|
||||
opener@^1.5.1, opener@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
|
||||
integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==
|
||||
@@ -22982,6 +23069,18 @@ tar@6.1.11, tar@^6.0.2:
|
||||
mkdirp "^1.0.3"
|
||||
yallist "^4.0.0"
|
||||
|
||||
tcomb-validation@^3.3.0:
|
||||
version "3.4.1"
|
||||
resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65"
|
||||
integrity sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==
|
||||
dependencies:
|
||||
tcomb "^3.0.0"
|
||||
|
||||
tcomb@^3.0.0, tcomb@^3.2.17:
|
||||
version "3.2.29"
|
||||
resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-3.2.29.tgz#32404fe9456d90c2cf4798682d37439f1ccc386c"
|
||||
integrity sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==
|
||||
|
||||
telejson@^6.0.8:
|
||||
version "6.0.8"
|
||||
resolved "https://registry.yarnpkg.com/telejson/-/telejson-6.0.8.tgz#1c432db7e7a9212c1fbd941c3e5174ec385148f7"
|
||||
@@ -24126,6 +24225,11 @@ validate-npm-package-license@^3.0.1:
|
||||
spdx-correct "^3.0.0"
|
||||
spdx-expression-parse "^3.0.0"
|
||||
|
||||
validator@^13.6.0:
|
||||
version "13.9.0"
|
||||
resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855"
|
||||
integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==
|
||||
|
||||
valtio@1.10.3:
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.10.3.tgz#273eda9ba6459869798b4f58c84514e18fb80ed8"
|
||||
|
||||
Reference in New Issue
Block a user