Compare commits

..
54 changed files with 226 additions and 1458 deletions
+4 -8
View File
@@ -91,11 +91,7 @@ jobs:
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: logs-${{ matrix.project }}
path: /home/runner/.vegacapsule/testnet/logs
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-report-${{ matrix.project }}
path: frontend-monorepo/apps/trading-e2e/cypress/reports
name: test-report-and-logs-${{ matrix.project }}
path: |
/home/runner/.vegacapsule/testnet/logs
frontend-monorepo/apps/trading-e2e/cypress/reports
@@ -1,38 +0,0 @@
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',
},
};
@@ -1,117 +0,0 @@
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',
},
};
@@ -1,325 +0,0 @@
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,14 +3,11 @@ 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"]';
@@ -24,140 +21,56 @@ context(
navigateTo(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'
);
describe('with no network change proposals', function () {
it('should have governance tab highlighted', function () {
verifyTabHighlighted(navigation.proposals);
});
});
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 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`
);
}
});
});
cy.getByTestId('closed-proposals').within(() => {
cy.getByTestId('protocol-upgrade-proposals-list-item').should(
'have.length',
1
);
});
});
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', '%');
}
);
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');
});
// 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();
});
});
}
@@ -334,8 +334,11 @@ context(
.parent()
.siblings()
.invoke('text')
.then(parseFloat)
.should('be.gte', parseFloat(expectedAmount));
.should('have.length.above', 3)
.then((el) => {
const value = parseFloat(el);
cy.wrap(value).should('be.gte', parseFloat(expectedAmount));
});
cy.get(vegaWalletCurrencyTitle)
.contains(id)
@@ -12,7 +12,6 @@ context(
{ tags: '@smoke' },
function () {
before('navigate to withdrawals page', function () {
cy.clearAllLocalStorage();
cy.visit('/');
navigateTo(navigation.withdraw);
});
@@ -1,9 +1,5 @@
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;
@@ -84,11 +80,3 @@ export function createFreeFormProposalTxBody(): ProposalSubmissionBody {
},
};
}
export function mockNetworkUpgradeProposal() {
cy.mockGQL((req) => {
aliasGQLQuery(req, 'Nodes', nodeData);
aliasGQLQuery(req, 'Proposals', proposalsData);
aliasGQLQuery(req, 'ProtocolUpgrades', upgradeProposalsData);
});
}
@@ -57,7 +57,10 @@ export const ProtocolUpdateProposalDetailApprovals = ({
noBorder={index === consensusApprovals?.length - 1}
key={validator.pubkey}
>
<div className="-mb-3 mt-1" data-testid={'validator-name'}>
<div
className="-mb-3 mt-1"
data-testid={`validator-${validator.id}`}
>
<ValidatorDetailsLink
id={validator.id}
avatarUrl={validator.avatarUrl}
@@ -65,7 +68,7 @@ export const ProtocolUpdateProposalDetailApprovals = ({
/>
</div>
<span data-testid="validator-voting-power">
<span>
{getNormalisedVotingPower(
validator.rankingScore.votingPower,
2
@@ -63,7 +63,7 @@ describe('ProtocolUpdateProposalDetailApprovals', () => {
it('renders the correct number of consensus approvers', () => {
renderComponent();
const validators = screen.getAllByTestId(/validator-name/);
const validators = screen.getAllByTestId(/validator-/i);
expect(validators.length).toBe(mockValidators.length);
});
+54 -347
View File
@@ -36,25 +36,10 @@
"tranche_id": 56,
"tranche_start": "2023-04-20T00:00:00.000Z",
"tranche_end": "2023-05-20T00:00:00.000Z",
"total_added": "17206.625",
"total_removed": "202.093666077975",
"locked_amount": "14192.3522349054765257",
"total_added": "15761.125",
"total_removed": "0",
"locked_amount": "15494.9188690682869786625",
"deposits": [
{
"amount": "188",
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
"tx": "0xefa5cb034a994bd2cf2b100b1ecca1877038e7b1188fab4ebf2065cb165027e4"
},
{
"amount": "50",
"user": "0xAc1c2783d64c29CDB79608f5B66a37Fd1ea35dD6",
"tx": "0xc1ede6de1653f205e0a743f609835648a67287a271a994cd141911ce13d5cac7"
},
{
"amount": "1207.5",
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
"tx": "0x9092eaf46d5cdba3b2219aa7187da4e1623004434c33a915956aa45d04d561f2"
},
{
"amount": "241.5",
"user": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
@@ -196,66 +181,8 @@
"tx": "0x679fcc1c3a29bdc259b6a4c044579a89c5357f42ed1963221669ebf43cc545b0"
}
],
"withdrawals": [
{
"amount": "202.093666077975",
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
"tx": "0x300c18b4220d3bc357f054792cb65f05d4005912bf8e5d9580b5b830cc3c0845"
}
],
"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": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
"deposits": [
{
"amount": "1207.5",
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
"tranche_id": 56,
"tx": "0x9092eaf46d5cdba3b2219aa7187da4e1623004434c33a915956aa45d04d561f2"
}
],
"withdrawals": [
{
"amount": "202.093666077975",
"user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756",
"tranche_id": 56,
"tx": "0x300c18b4220d3bc357f054792cb65f05d4005912bf8e5d9580b5b830cc3c0845"
}
],
"total_tokens": "1207.5",
"withdrawn_tokens": "202.093666077975",
"remaining_tokens": "1005.406333922025"
},
{
"address": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
"deposits": [
@@ -737,15 +664,10 @@
"tranche_id": 54,
"tranche_start": "2023-04-06T00:00:00.000Z",
"tranche_end": "2023-05-06T00:00:00.000Z",
"total_added": "8976",
"total_removed": "596.64743517951",
"locked_amount": "3214.7758703703708912",
"total_added": "8865",
"total_removed": "362.31015740205",
"locked_amount": "4578.269739583333005",
"deposits": [
{
"amount": "111",
"user": "0x90Cf7B9958C3BbBCddAb52Ecc408535D4f3C4241",
"tx": "0x1229e077f48b796678436bfa8143cea3ae71df58b589ac922be205c4482be235"
},
{
"amount": "33",
"user": "0xBf1AaB792D729fA125e6D7122D4b916a1E1C44B1",
@@ -883,11 +805,6 @@
}
],
"withdrawals": [
{
"amount": "106.53500000286",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
"tx": "0x4027743264e01043ddb16676c6f7914c110df9e7212bd3f21cb6842614ce238f"
},
{
"amount": "5.46866782407",
"user": "0x92A1e98C6f09970e45645Cbe57c6DcaF4547c8FE",
@@ -908,11 +825,6 @@
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
"tx": "0x05d086879e23724f1397d41adcbe2f3316dd4039c240edbc3cbbcacf1ca1d00e"
},
{
"amount": "127.8022777746",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
"tx": "0xb67468e99866887e95c5a211fe8611d107b02ef094d9b90343820366a5e8c7a0"
},
{
"amount": "52.2185023074",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
@@ -920,21 +832,6 @@
}
],
"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": [
@@ -1141,12 +1038,6 @@
}
],
"withdrawals": [
{
"amount": "106.53500000286",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
"tranche_id": 54,
"tx": "0x4027743264e01043ddb16676c6f7914c110df9e7212bd3f21cb6842614ce238f"
},
{
"amount": "155.03186111556",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
@@ -1159,12 +1050,6 @@
"tranche_id": 54,
"tx": "0x05d086879e23724f1397d41adcbe2f3316dd4039c240edbc3cbbcacf1ca1d00e"
},
{
"amount": "127.8022777746",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
"tranche_id": 54,
"tx": "0xb67468e99866887e95c5a211fe8611d107b02ef094d9b90343820366a5e8c7a0"
},
{
"amount": "52.2185023074",
"user": "0x6F32AA5A6198329c16e438512F992a0548C856f9",
@@ -1173,8 +1058,8 @@
}
],
"total_tokens": "858",
"withdrawn_tokens": "531.01030786518",
"remaining_tokens": "326.98969213482"
"withdrawn_tokens": "296.67303008772",
"remaining_tokens": "561.32696991228"
},
{
"address": "0x0bBf7580e036eA5D69ABe679CC90117EeC2e3dc1",
@@ -4522,7 +4407,7 @@
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "86666.297",
"total_removed": "0",
"locked_amount": "53126.3383787007632981199",
"locked_amount": "54253.8851505212161988738",
"deposits": [
{
"amount": "86666.297",
@@ -4588,7 +4473,7 @@
"tranche_end": "2023-06-01T00:00:00.000Z",
"total_added": "2500",
"total_removed": "0",
"locked_amount": "504.733128561253575",
"locked_amount": "569.96289300976805",
"deposits": [
{
"amount": "2500",
@@ -4709,7 +4594,7 @@
"tranche_end": "2023-09-01T00:00:00.000Z",
"total_added": "17500",
"total_removed": "0",
"locked_amount": "12244.72829232085475",
"locked_amount": "12696.37350920893675",
"deposits": [
{
"amount": "12500",
@@ -4975,8 +4860,8 @@
"tranche_start": "2023-02-01T00:00:00.000Z",
"tranche_end": "2023-08-01T00:00:00.000Z",
"total_added": "37500",
"total_removed": "12539.2989369",
"locked_amount": "20250.94718769183375",
"total_removed": "12294.731717775",
"locked_amount": "21234.79943600368125",
"deposits": [
{
"amount": "7500",
@@ -5005,11 +4890,6 @@
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0x2c8a0681fe27258861489cd7a891cf213c7ab930d86b1bf08cd54f2f3739a8b5"
},
{
"amount": "244.567219125",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0x4bc7559edf36b6ecda7656f8066479395ea441daf0ad37ad4324814348e41643"
},
{
"amount": "158.943370125",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -5166,12 +5046,6 @@
"tranche_id": 34,
"tx": "0x2c8a0681fe27258861489cd7a891cf213c7ab930d86b1bf08cd54f2f3739a8b5"
},
{
"amount": "244.567219125",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tranche_id": 34,
"tx": "0x4bc7559edf36b6ecda7656f8066479395ea441daf0ad37ad4324814348e41643"
},
{
"amount": "158.943370125",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -5312,8 +5186,8 @@
}
],
"total_tokens": "7500",
"withdrawn_tokens": "3303.8496585",
"remaining_tokens": "4196.1503415"
"withdrawn_tokens": "3059.282439375",
"remaining_tokens": "4440.717560625"
},
{
"address": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600",
@@ -5351,7 +5225,7 @@
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "129999.45",
"total_removed": "0",
"locked_amount": "53077.8672795424049222625",
"locked_amount": "54204.385306806945473172",
"deposits": [
{
"amount": "129999.45",
@@ -5384,7 +5258,7 @@
"tranche_end": "2024-04-01T00:00:00.000Z",
"total_added": "54144.7663",
"total_removed": "0",
"locked_amount": "50556.50265628052469670738",
"locked_amount": "51259.01278091454623854912",
"deposits": [
{
"amount": "54144.7663",
@@ -5417,7 +5291,7 @@
"tranche_end": "2023-09-03T00:00:00.000Z",
"total_added": "62600",
"total_removed": "0",
"locked_amount": "22423.58956747843764",
"locked_amount": "23238.02874809741452",
"deposits": [
{
"amount": "10000",
@@ -5610,7 +5484,7 @@
"tranche_end": "2023-09-17T00:00:00.000Z",
"total_added": "5000",
"total_removed": "0",
"locked_amount": "1982.802352866565",
"locked_amount": "2047.85340563165885",
"deposits": [
{
"amount": "5000",
@@ -6150,8 +6024,8 @@
"tranche_start": "2022-11-01T00:00:00.000Z",
"tranche_end": "2023-05-01T00:00:00.000Z",
"total_added": "22500",
"total_removed": "7115.9985996",
"locked_amount": "714.104224217310375",
"total_removed": "6871.43713545",
"locked_amount": "1304.415573204420675",
"deposits": [
{
"amount": "7500",
@@ -6180,11 +6054,6 @@
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0x15840e283faffb39a5d0e3389137ec92cec3deee7df535a534908ccd7d6b0873"
},
{
"amount": "244.56146415",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0x00275dfbd06b609e69b430eef7fe04c7bb64314904a0478a0e55b643f7f0bc09"
},
{
"amount": "158.9433702",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -6396,12 +6265,6 @@
"tranche_id": 33,
"tx": "0x15840e283faffb39a5d0e3389137ec92cec3deee7df535a534908ccd7d6b0873"
},
{
"amount": "244.56146415",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tranche_id": 33,
"tx": "0x00275dfbd06b609e69b430eef7fe04c7bb64314904a0478a0e55b643f7f0bc09"
},
{
"amount": "158.9433702",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -6620,8 +6483,8 @@
}
],
"total_tokens": "7500",
"withdrawn_tokens": "7115.9985996",
"remaining_tokens": "384.0014004"
"withdrawn_tokens": "6871.43713545",
"remaining_tokens": "628.56286455"
},
{
"address": "0x2539b51EbDE65a75672aBcfE9439a706a99D18D1",
@@ -6646,7 +6509,7 @@
"tranche_end": "2023-06-02T00:00:00.000Z",
"total_added": "1939928.38",
"total_removed": "928642.9598472029154",
"locked_amount": "200607.5779362562454442532",
"locked_amount": "225846.4546178330654320676",
"deposits": [
{
"amount": "1852091.69",
@@ -40462,7 +40325,7 @@
"tranche_end": "2023-06-05T00:00:00.000Z",
"total_added": "3732368.4671",
"total_removed": "715655.108029600523393",
"locked_amount": "332765.327876919897996287797",
"locked_amount": "371548.694092943839794156471",
"deposits": [
{
"amount": "1998.95815",
@@ -41854,8 +41717,8 @@
"tranche_start": "2022-06-05T00:00:00.000Z",
"tranche_end": "2023-12-05T00:00:00.000Z",
"total_added": "15870102.715470999700000001",
"total_removed": "860379.54790441442685852",
"locked_amount": "6479652.07271627106022165330027333915923225",
"total_removed": "835090.78677275839915352",
"locked_amount": "6617175.39918817550807202992275848610786696",
"deposits": [
{
"amount": "16249.93",
@@ -42359,16 +42222,6 @@
}
],
"withdrawals": [
{
"amount": "10150.87581603206683",
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
"tx": "0x2ee57ee8a712525955ad807f4d45eeaa5f6388bf0b4fceabc7de6871899f736e"
},
{
"amount": "913.910324501590625",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tx": "0x455d2e8214a5071fd4de1642939780068d4694cc2a774e7a3ab9283c4d52e847"
},
{
"amount": "981.387731774910625",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -42424,21 +42277,6 @@
"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",
@@ -44477,12 +44315,6 @@
}
],
"withdrawals": [
{
"amount": "913.910324501590625",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
"tranche_id": 2,
"tx": "0x455d2e8214a5071fd4de1642939780068d4694cc2a774e7a3ab9283c4d52e847"
},
{
"amount": "981.387731774910625",
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
@@ -44543,18 +44375,6 @@
"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",
@@ -45991,8 +45811,8 @@
}
],
"total_tokens": "259998.8875",
"withdrawn_tokens": "153085.67361955143925",
"remaining_tokens": "106913.21388044856075"
"withdrawn_tokens": "150733.980517927478375",
"remaining_tokens": "109264.906982072521625"
},
{
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
@@ -46219,12 +46039,6 @@
}
],
"withdrawals": [
{
"amount": "10150.87581603206683",
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
"tranche_id": 2,
"tx": "0x2ee57ee8a712525955ad807f4d45eeaa5f6388bf0b4fceabc7de6871899f736e"
},
{
"amount": "2873.74755113623213",
"user": "0xe3eB4CF43C072658401996b71D43eE26E573562D",
@@ -46497,8 +46311,8 @@
}
],
"total_tokens": "150551.801",
"withdrawn_tokens": "88566.24522601405589",
"remaining_tokens": "61985.55577398594411"
"withdrawn_tokens": "78415.36940998198906",
"remaining_tokens": "72136.43159001801094"
},
{
"address": "0x4d982Ab0823fD2f48e934a7be2bb0a5374a26148",
@@ -46718,12 +46532,6 @@
}
],
"withdrawals": [
{
"amount": "12786.192214",
"user": "0xF4c75FdbAe821C6B5DBB9f001bB23cBA58D1bA37",
"tranche_id": 2,
"tx": "0x57c9c9396f67fb377f2d7cca30a1a6e6b73267408efde1239cbfdfd99c333345"
},
{
"amount": "934.96553",
"user": "0xF4c75FdbAe821C6B5DBB9f001bB23cBA58D1bA37",
@@ -46972,8 +46780,8 @@
}
],
"total_tokens": "200000",
"withdrawn_tokens": "116957.518078",
"remaining_tokens": "83042.481922"
"withdrawn_tokens": "104171.325864",
"remaining_tokens": "95828.674136"
},
{
"address": "0x1b956E6c00E238194B331eddEFF72Cb5f28A8d01",
@@ -48355,8 +48163,8 @@
"tranche_start": "2021-11-05T00:00:00.000Z",
"tranche_end": "2023-05-05T00:00:00.000Z",
"total_added": "14597706.0446472999",
"total_removed": "5847991.884210280507681376",
"locked_amount": "260528.1942722316783230342092766613",
"total_removed": "5845111.643096907348272126",
"locked_amount": "387488.8511763643682805777108705054",
"deposits": [
{
"amount": "129284.449",
@@ -48565,11 +48373,6 @@
}
],
"withdrawals": [
{
"amount": "1257.7360413991436375",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tx": "0x42fa522871101c2d402faba52603df54599654f29ef5fe1211a9ea058b7eaad9"
},
{
"amount": "1360.32447632896938825",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
@@ -48645,16 +48448,6 @@
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tx": "0xc4a521e74b6b9c9c01e7fbd950f4096d3e6473a773818b4fdf0c9d974ee5fc7e"
},
{
"amount": "993.45434720929767175",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tx": "0x6b1bd1880e5539566cb7110e80ef3e877e3c46a2fcd88798e82211a962dd2b7b"
},
{
"amount": "629.0507247647181",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tx": "0x537a8c34bee648cc1e658c0e55d30202694887899bfcbe529f9cf8284a4e90eb"
},
{
"amount": "37462.74710421168752574",
"user": "0x66827bCD635f2bB1779d68c46aEB16541bCA6ba8",
@@ -51870,12 +51663,6 @@
}
],
"withdrawals": [
{
"amount": "1257.7360413991436375",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
"tranche_id": 3,
"tx": "0x42fa522871101c2d402faba52603df54599654f29ef5fe1211a9ea058b7eaad9"
},
{
"amount": "1360.32447632896938825",
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
@@ -51948,18 +51735,6 @@
"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",
@@ -54698,8 +54473,8 @@
}
],
"total_tokens": "359123.469575",
"withdrawn_tokens": "351655.06042082973919375",
"remaining_tokens": "7468.40915417026080625"
"withdrawn_tokens": "348774.8193074565797845",
"remaining_tokens": "10348.6502675434202155"
},
{
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
@@ -56150,7 +55925,7 @@
"tranche_start": "2021-10-05T00:00:00.000Z",
"tranche_end": "2023-04-05T00:00:00.000Z",
"total_added": "5778205.3912159303",
"total_removed": "3480709.486904665102263769",
"total_removed": "3421810.610823310514313769",
"locked_amount": "0",
"deposits": [
{
@@ -56295,11 +56070,6 @@
}
],
"withdrawals": [
{
"amount": "58898.87608135458795",
"user": "0x83b1a48376E045D26420200345414e6b93066396",
"tx": "0xeb193da202cd833a574a524eff7f1dd13a0ee8669e51a7db36984ef4d6735fd6"
},
{
"amount": "219.945520329711288",
"user": "0xafa64cCa337eFEE0AD827F6C2684e69275226e90",
@@ -57817,12 +57587,6 @@
}
],
"withdrawals": [
{
"amount": "58898.87608135458795",
"user": "0x83b1a48376E045D26420200345414e6b93066396",
"tranche_id": 4,
"tx": "0xeb193da202cd833a574a524eff7f1dd13a0ee8669e51a7db36984ef4d6735fd6"
},
{
"amount": "66753.39849271259062",
"user": "0x83b1a48376E045D26420200345414e6b93066396",
@@ -57891,8 +57655,8 @@
}
],
"total_tokens": "1104995.291",
"withdrawn_tokens": "1104995.291",
"remaining_tokens": "0"
"withdrawn_tokens": "1046096.41491864541205",
"remaining_tokens": "58898.87608135458795"
},
{
"address": "0x5565d64f29Ea17355106DF3bA5903Eb793B3e139",
@@ -58344,8 +58108,8 @@
"tranche_start": "2022-06-05T00:00:00.000Z",
"tranche_end": "2023-06-05T00:00:00.000Z",
"total_added": "472355.6199999996",
"total_removed": "43365.4083448891849",
"locked_amount": "52728.553391508069839034794317608",
"total_removed": "43120.0853616251849",
"locked_amount": "58874.014441908253564521489193296",
"deposits": [
{
"amount": "3000",
@@ -64964,16 +64728,6 @@
}
],
"withdrawals": [
{
"amount": "182.662252664",
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
"tx": "0xc182a183d124ab4faa413e71faa8c764fc265b4c568a5025ead367fbb86da331"
},
{
"amount": "62.6607306",
"user": "0x7345AaA0D0e4C4A46d921fA9323973956F2b7392",
"tx": "0xb13444d5ef684a442be6c285a6c38dcbc9959ff2eacc31474531826efe28c20a"
},
{
"amount": "168.502276762",
"user": "0x38A292CB98Dc602ECAFF94E8E5fADD9800e4bA13",
@@ -83524,12 +83278,6 @@
}
],
"withdrawals": [
{
"amount": "62.6607306",
"user": "0x7345AaA0D0e4C4A46d921fA9323973956F2b7392",
"tranche_id": 5,
"tx": "0xb13444d5ef684a442be6c285a6c38dcbc9959ff2eacc31474531826efe28c20a"
},
{
"amount": "152.077625568",
"user": "0x7345AaA0D0e4C4A46d921fA9323973956F2b7392",
@@ -83586,8 +83334,8 @@
}
],
"total_tokens": "1200",
"withdrawn_tokens": "1064.754756468",
"remaining_tokens": "135.245243532"
"withdrawn_tokens": "1002.094025868",
"remaining_tokens": "197.905974132"
},
{
"address": "0x47181cf36aDFb0b5dB7EfDB123f403D890607841",
@@ -86555,12 +86303,6 @@
}
],
"withdrawals": [
{
"amount": "182.662252664",
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
"tranche_id": 5,
"tx": "0xc182a183d124ab4faa413e71faa8c764fc265b4c568a5025ead367fbb86da331"
},
{
"amount": "78.04403856",
"user": "0xb1169C6daAc76bAcaf0D8f87641Fc38fbabe569F",
@@ -86575,8 +86317,8 @@
}
],
"total_tokens": "400",
"withdrawn_tokens": "354.201204972",
"remaining_tokens": "45.798795028"
"withdrawn_tokens": "171.538952308",
"remaining_tokens": "228.461047692"
},
{
"address": "0xF53D81D9f3A1465df9AD1b12ddDB5cC585D96877",
@@ -88053,7 +87795,7 @@
"tranche_start": "2021-12-05T00:00:00.000Z",
"tranche_end": "2022-06-05T00:00:00.000Z",
"total_added": "171288.42",
"total_removed": "69890.5995794947989",
"total_removed": "69390.5995794947989",
"locked_amount": "0",
"deposits": [
{
@@ -92293,16 +92035,6 @@
"user": "0x0715B8bA27dB75F7601A9D8E22c15dcA1487FB70",
"tx": "0x11c685c41ff0c2d5f1d7fe3b08dc84a7ddb9160764a45bc61b8f39df94729634"
},
{
"amount": "250",
"user": "0xf8Ec254406f878dA2BEd160730d238524Af3D5F6",
"tx": "0xb79fdf2dddc0ac091d7cdc737800683482d24367f18daaf5ab98c703b30bfee5"
},
{
"amount": "250",
"user": "0xBD1da3A721510B6d76f5b2C553d31753cc148bEC",
"tx": "0x17504994220684f4ba61ec374fdd5b0e4c0e0a9cfb15aa6794338b5a4de9eb68"
},
{
"amount": "1250",
"user": "0x9405F540EcC1204801De5C4444D06386BD6693F0",
@@ -99453,17 +99185,10 @@
"tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307"
}
],
"withdrawals": [
{
"amount": "250",
"user": "0xBD1da3A721510B6d76f5b2C553d31753cc148bEC",
"tranche_id": 6,
"tx": "0x17504994220684f4ba61ec374fdd5b0e4c0e0a9cfb15aa6794338b5a4de9eb68"
}
],
"withdrawals": [],
"total_tokens": "250",
"withdrawn_tokens": "250",
"remaining_tokens": "0"
"withdrawn_tokens": "0",
"remaining_tokens": "250"
},
{
"address": "0x4e8bA6747F20009163e51Ff1b5D3edd3Ef7c6C90",
@@ -99497,17 +99222,10 @@
"tx": "0x75de6ca47e0da361181d14aceb5d08e572754861465caa67a12b528886d55307"
}
],
"withdrawals": [
{
"amount": "250",
"user": "0xf8Ec254406f878dA2BEd160730d238524Af3D5F6",
"tranche_id": 6,
"tx": "0xb79fdf2dddc0ac091d7cdc737800683482d24367f18daaf5ab98c703b30bfee5"
}
],
"withdrawals": [],
"total_tokens": "250",
"withdrawn_tokens": "250",
"remaining_tokens": "0"
"withdrawn_tokens": "0",
"remaining_tokens": "250"
},
{
"address": "0xd995e89D6cCB2252388b9BaE0173981b5EfA0817",
@@ -143598,11 +143316,6 @@
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
"tx": "0x11aafa8a2fb510a50d52e5d1e149c5c2027ad2c3dc2d9ef67c18d391c0331c49"
},
{
"amount": "0",
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
"tx": "0x2e48ba2e6ca4994286e85e57d26b578fb0fd625f44a6fd27202476bb18575a40"
},
{
"amount": "0",
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
@@ -143891,12 +143604,6 @@
"tranche_id": 9,
"tx": "0x11aafa8a2fb510a50d52e5d1e149c5c2027ad2c3dc2d9ef67c18d391c0331c49"
},
{
"amount": "0",
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
"tranche_id": 9,
"tx": "0x2e48ba2e6ca4994286e85e57d26b578fb0fd625f44a6fd27202476bb18575a40"
},
{
"amount": "0",
"user": "0x759C9ABABA492500c4c730bEB568B5b851Dec2c7",
@@ -1,18 +1,7 @@
import { aliasGQLQuery } from '@vegaprotocol/cypress';
import { fillsQuery } from '@vegaprotocol/mock';
const tabFills = 'tab-fills';
describe('fills', { tags: '@regression' }, () => {
// 7005-FILL-001
// 7005-FILL-002
// 7005-FILL-003
// 7005-FILL-004
// 7005-FILL-005
// 7005-FILL-006
// 7005-FILL-007
// 7005-FILL-008
beforeEach(() => {
// Ensure page loads with correct key
cy.window().then((window) => {
@@ -49,37 +38,31 @@ describe('fills', { tags: '@regression' }, () => {
});
function validateFillsDisplayed() {
cy.getByTestId(tabFills).should('be.visible');
cy.getByTestId(tabFills).contains('Market');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills').should('be.visible');
cy.getByTestId('tab-fills')
.get(
'[role="gridcell"][col-id="market.tradableInstrument.instrument.name"]'
)
.each(($marketSymbol) => {
cy.wrap($marketSymbol).invoke('text').should('not.be.empty');
});
cy.getByTestId(tabFills).contains('Size');
cy.get(`[col-id='size']`).eq(1).should('contain.text', '+');
cy.get(`[col-id='size']`).eq(2).should('contain.text', '-');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills')
.get('[role="gridcell"][col-id="size"]')
.each(($amount) => {
cy.wrap($amount).invoke('text').should('not.be.empty');
});
cy.getByTestId(tabFills).contains('Price');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills')
.get('[role="gridcell"][col-id="price"]')
.each(($prices) => {
cy.wrap($prices).invoke('text').should('not.be.empty');
});
cy.getByTestId(tabFills).contains('Notional');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills')
.get('[role="gridcell"][col-id="price_1"]')
.each(($total) => {
cy.wrap($total).invoke('text').should('not.be.empty');
});
cy.getByTestId(tabFills).contains('Role');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills')
.get('[role="gridcell"][col-id="aggressor"]')
.each(($role) => {
cy.wrap($role)
@@ -89,15 +72,13 @@ describe('fills', { tags: '@regression' }, () => {
expect(roles.indexOf(text.trim())).to.be.greaterThan(-1);
});
});
cy.getByTestId(tabFills).contains('Fee');
cy.getByTestId(tabFills)
cy.getByTestId('tab-fills')
.get(
'[role="gridcell"][col-id="market.tradableInstrument.instrument.product"]'
)
.each(($fees) => {
cy.wrap($fees).invoke('text').should('not.be.empty');
});
cy.getByTestId(tabFills).contains('Date');
const dateTimeRegex =
/(\d{1,2})\/(\d{1,2})\/(\d{4}), (\d{1,2}):(\d{1,2}):(\d{1,2})/gm;
cy.get('[col-id="createdAt"]').each(($tradeDateTime, index) => {
@@ -7,6 +7,7 @@ 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,10 +12,11 @@ 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';
@@ -32,10 +33,6 @@ import {
useMarketClickHandler,
useMarketLiquidityClickHandler,
} from '../../lib/hooks/use-market-click-handler';
import {
ResizableGrid,
ResizableGridPanel,
} from '../../components/resizable-grid';
type MarketDependantView =
| typeof CandlesChartContainer
@@ -274,10 +271,7 @@ export const TradeGrid = ({
}: TradeGridProps) => {
return (
<div className="h-full grid grid-rows-[min-content_1fr]">
<div>
<TradeMarketHeader market={market} onSelect={onSelect} />
<OracleBanner marketId={market?.id || ''} />
</div>
<TradeMarketHeader market={market} onSelect={onSelect} />
<MainGrid
marketId={market?.id || ''}
onSelect={onSelect}
@@ -2,13 +2,18 @@ import { titlefy } from '@vegaprotocol/utils';
import { t } from '@vegaprotocol/i18n';
import { PositionsContainer } from '@vegaprotocol/positions';
import { OrderListContainer } from '@vegaprotocol/orders';
import { Tab, LocalStoragePersistTabs as Tabs } from '@vegaprotocol/ui-toolkit';
import {
ResizableGridPanel,
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';
@@ -18,10 +23,6 @@ import {
useMarketClickHandler,
useMarketLiquidityClickHandler,
} from '../../lib/hooks/use-market-click-handler';
import {
ResizableGrid,
ResizableGridPanel,
} from '../../components/resizable-grid';
export const Portfolio = () => {
const { updateTitle } = usePageTitleStore((store) => ({
@@ -1,13 +1,16 @@
import { AnnouncementBanner as Banner } from '@vegaprotocol/announcements';
import { AnnouncementBanner } from '@vegaprotocol/announcements';
import { useEnvironment } from '@vegaprotocol/environment';
export const AnnouncementBanner = () => {
export const Banner = () => {
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 <Banner app="console" configUrl={ANNOUNCEMENTS_CONFIG_URL} />;
return (
<AnnouncementBanner app="console" configUrl={ANNOUNCEMENTS_CONFIG_URL} />
);
};
+1 -2
View File
@@ -1,2 +1 @@
export * from './announcement-banner';
export * from './oracle-banner';
export * from './banner';
@@ -1,44 +0,0 @@
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>
);
};
+2 -2
View File
@@ -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 { AnnouncementBanner } from '../components/banner';
import { Banner } 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}>
<AnnouncementBanner />
<Banner />
<Navbar theme={VEGA_ENV === Networks.TESTNET ? 'yellow' : 'system'} />
<ViewingBanner />
<main data-testid={location.pathname}>
+6 -6
View File
@@ -1,16 +1,16 @@
import { forwardRef } from 'react';
import { addDecimalsFormatNumber } from '@vegaprotocol/utils';
import { t } from '@vegaprotocol/i18n';
import { Intent } from '@vegaprotocol/ui-toolkit';
import {
Intent,
progressBarCellRendererSelector,
} 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,
VegaValueFormatterParams,
} from '@vegaprotocol/datagrid';
import { progressBarCellRendererSelector } from '@vegaprotocol/datagrid';
import type { ValueProps } from '@vegaprotocol/ui-toolkit';
import type { VegaValueFormatterParams } from '@vegaprotocol/datagrid';
import { AgGridDynamic as AgGrid, PriceCell } from '@vegaprotocol/datagrid';
import type { ValueFormatterParams } from 'ag-grid-community';
import { accountValuesComparator } from './accounts-table';
-2
View File
@@ -17,5 +17,3 @@ export * from './lib/filters/set-filter';
export * from './lib/cell-class-rules';
export * from './lib/type-helpers';
export * from './lib/cells/grid-progress-bar';
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "@vegaprotocol/i18n",
"version": "0.0.2",
"version": "0.0.1",
"type": "commonjs"
}
-1
View File
@@ -6,7 +6,6 @@
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"format": ["esm", "cjs"],
"options": {
"outputPath": "dist/libs/i18n",
"main": "libs/i18n/src/index.ts",
-1
View File
@@ -1 +0,0 @@
export * from './use-market-oracle';
@@ -1,132 +0,0 @@
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);
});
});
@@ -1,43 +0,0 @@
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
View File
@@ -1,2 +1 @@
export * from './components';
export * from './hooks';
@@ -176,16 +176,14 @@ export const MarketListTable = forwardRef<
/>
<AgGridColumn
headerName={t('Settlement asset')}
field="tradableInstrument.instrument.product.settlementAsset.symbol"
field="tradableInstrument.instrument.product.settlementAsset"
cellRenderer={({
data,
value,
}: VegaICellRendererParams<
MarketMaybeWithData,
'tradableInstrument.instrument.product.settlementAsset.symbol'
>) => {
const value =
data?.tradableInstrument.instrument.product.settlementAsset;
return value ? (
'tradableInstrument.instrument.product.settlementAsset'
>) =>
value ? (
<ButtonLink
onClick={(e) => {
openAssetDetailsDialog(value.id, e.target as HTMLElement);
@@ -195,8 +193,8 @@ export const MarketListTable = forwardRef<
</ButtonLink>
) : (
''
);
}}
)
}
/>
<AgGridColumn headerName={t('Market ID')} field="id" />
</AgGrid>
+1 -1
View File
@@ -8,7 +8,6 @@ import type {
TypedDataAgGrid,
VegaICellRendererParams,
} from '@vegaprotocol/datagrid';
import { ProgressBarCell } from '@vegaprotocol/datagrid';
import {
AgGridDynamic as AgGrid,
DateRangeFilter,
@@ -23,6 +22,7 @@ import {
TooltipCellComponent,
ExternalLink,
Icon,
ProgressBarCell,
} from '@vegaprotocol/ui-toolkit';
import {
volumePrefix,
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "@vegaprotocol/react-helpers",
"version": "0.2.2"
"version": "0.2.0"
}
-1
View File
@@ -16,7 +16,6 @@
"external": ["react/jsx-runtime"],
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
"compiler": "babel",
"format": ["esm", "cjs"],
"assets": [
{
"glob": "libs/react-helpers/README.md",
+4 -2
View File
@@ -1,11 +1,13 @@
import { useRef } from 'react';
import { BrowserTracing } from '@sentry/tracing';
import * as Sentry from '@sentry/browser';
import type { LocalLogger, LoggerConf } from '@vegaprotocol/utils';
import type { LocalLogger } from '@vegaprotocol/utils';
import { localLoggerFactory } from '@vegaprotocol/utils';
interface Props extends LoggerConf {
interface Props {
dsn?: string;
application?: string;
tags?: string[];
}
export const useLogger = ({ dsn, ...props }: Props) => {
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "@vegaprotocol/tailwindcss-config",
"version": "0.0.2"
"version": "0.0.1"
}
-1
View File
@@ -6,7 +6,6 @@
"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 -1
View File
@@ -1,4 +1,4 @@
{
"name": "@vegaprotocol/types",
"version": "0.0.2"
"version": "0.0.1"
}
-1
View File
@@ -15,7 +15,6 @@
"external": ["react/jsx-runtime"],
"rollupConfig": "@nrwl/react/plugins/bundle-rollup",
"compiler": "babel",
"format": ["esm", "cjs"],
"assets": [
{
"glob": "libs/types/README.md",
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "@vegaprotocol/ui-toolkit",
"version": "0.12.1"
"version": "0.11.0"
}
-1
View File
@@ -16,7 +16,6 @@
"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 flex-1', {
className={classNames('text-sm', {
'dark:text-neutral-400 text-neutral-600': disabled,
})}
>
@@ -16,6 +16,7 @@ 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
+2 -2
View File
@@ -12,7 +12,6 @@ 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';
@@ -26,11 +25,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';
@@ -50,3 +49,4 @@ export * from './traffic-light';
export * from './vega-icons';
export * from './vega-logo';
export * from './viewing-as-user';
export * from './healthbar';
@@ -1 +0,0 @@
export * from './notification-banner';
@@ -1,45 +0,0 @@
/* 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 = {};
@@ -1,80 +0,0 @@
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,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?: {
@@ -1 +1,2 @@
export * from './grid-progress-bar';
export * from './progress-bar';
@@ -0,0 +1,24 @@
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;
};
export const toastIconMapping: { [i in Intent]: IconName } = {
const toastIconMapping: { [i in Intent]: IconName } = {
[Intent.None]: IconNames.HELP,
[Intent.Primary]: IconNames.INFO_SIGN,
[Intent.Success]: IconNames.TICK_CIRCLE,
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "@vegaprotocol/utils",
"version": "0.0.2",
"version": "0.0.1",
"type": "commonjs"
}
-1
View File
@@ -6,7 +6,6 @@
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"format": ["esm", "cjs"],
"options": {
"outputPath": "dist/libs/utils",
"main": "libs/utils/src/index.ts",
+1 -1
View File
@@ -21,7 +21,7 @@ type ConsoleMethod = {
}[keyof Console] &
string;
export interface LoggerConf {
interface LoggerConf {
application?: string;
tags?: string[];
logLevel?: LogLevelsType;
+26 -37
View File
@@ -17489,11 +17489,6 @@ 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"
@@ -18437,33 +18432,6 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@^0.5.6, mkdirp@~0.5.1:
dependencies:
minimist "^1.2.6"
mocha@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8"
integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==
dependencies:
ansi-colors "4.1.1"
browser-stdout "1.3.1"
chokidar "3.5.3"
debug "4.3.4"
diff "5.0.0"
escape-string-regexp "4.0.0"
find-up "5.0.0"
glob "7.2.0"
he "1.2.0"
js-yaml "4.1.0"
log-symbols "4.1.0"
minimatch "5.0.1"
ms "2.1.3"
nanoid "3.3.3"
serialize-javascript "6.0.0"
strip-json-comments "3.1.1"
supports-color "8.1.1"
workerpool "6.2.1"
yargs "16.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"
@@ -18506,6 +18474,32 @@ mochawesome@^7.1.3:
mochawesome-report-generator "^6.2.0"
strip-ansi "^6.0.1"
uuid "^8.3.2"
mocha@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8"
integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==
dependencies:
ansi-colors "4.1.1"
browser-stdout "1.3.1"
chokidar "3.5.3"
debug "4.3.4"
diff "5.0.0"
escape-string-regexp "4.0.0"
find-up "5.0.0"
glob "7.2.0"
he "1.2.0"
js-yaml "4.1.0"
log-symbols "4.1.0"
minimatch "5.0.1"
ms "2.1.3"
nanoid "3.3.3"
serialize-javascript "6.0.0"
strip-json-comments "3.1.1"
supports-color "8.1.1"
workerpool "6.2.1"
yargs "16.2.0"
yargs-parser "20.2.4"
yargs-unparser "2.0.0"
mock-apollo-client@^1.2.0:
version "1.2.1"
@@ -24225,11 +24219,6 @@ 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"