From b336291b49428b58b308680ab5b6bf0e7d65a227 Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Thu, 27 Apr 2023 17:26:00 +0100 Subject: [PATCH 1/9] =?UTF-8?q?fix(governance):=20use=20default=20jsonrpc?= =?UTF-8?q?=20connector=20when=20the=20provider=20from=20useWe=E2=80=A6=20?= =?UTF-8?q?(#3563)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contexts/contracts/contracts-provider.tsx | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/apps/governance/src/contexts/contracts/contracts-provider.tsx b/apps/governance/src/contexts/contracts/contracts-provider.tsx index 7737a4248..f4a4c470f 100644 --- a/apps/governance/src/contexts/contracts/contracts-provider.tsx +++ b/apps/governance/src/contexts/contracts/contracts-provider.tsx @@ -14,13 +14,17 @@ import { ContractsContext } from './contracts-context'; import { createDefaultProvider } from '../../lib/web3-connectors'; import { useEthereumConfig } from '@vegaprotocol/web3'; import { useEnvironment } from '@vegaprotocol/environment'; -import { ENV } from '../../config/env'; +import { ENV } from '../../config'; /** * Provides Vega Ethereum contract instances to its children. */ export const ContractsProvider = ({ children }: { children: JSX.Element }) => { - const { provider: activeProvider, account } = useWeb3React(); + const { + provider: activeProvider, + account, + chainId: activeChainId, + } = useWeb3React(); const { config } = useEthereumConfig(); const { VEGA_ENV, ETHEREUM_PROVIDER_URL } = useEnvironment(); const [contracts, setContracts] = @@ -39,7 +43,11 @@ export const ContractsProvider = ({ children }: { children: JSX.Element }) => { ETHEREUM_PROVIDER_URL, Number(config.chain_id) ); - const provider = activeProvider ? activeProvider : defaultProvider; + + const provider = + activeProvider && activeChainId === Number(config.chain_id) + ? activeProvider + : defaultProvider; if ( account && @@ -84,7 +92,14 @@ export const ContractsProvider = ({ children }: { children: JSX.Element }) => { // TODO: hacky quick fix for release to prevent race condition, find a better fix for this. cancelled = true; }; - }, [activeProvider, account, config, VEGA_ENV, ETHEREUM_PROVIDER_URL]); + }, [ + activeProvider, + activeChainId, + account, + config, + VEGA_ENV, + ETHEREUM_PROVIDER_URL, + ]); if (!contracts) { return ( From 85060a04213dff92f748aa6d4ac9151f22b46f73 Mon Sep 17 00:00:00 2001 From: dexturr Date: Thu, 27 Apr 2023 18:10:05 +0000 Subject: [PATCH 2/9] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 84 ++++++++++++++------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 206381376..1ef5e0f95 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-05-20T00:00:00.000Z", "total_added": "19242.125", "total_removed": "494.628795994665", - "locked_amount": "14427.42907711226823345", + "locked_amount": "14266.7513944347992639375", "deposits": [ { "amount": "188", @@ -822,7 +822,7 @@ "tranche_end": "2023-05-06T00:00:00.000Z", "total_added": "8976", "total_removed": "596.64743517951", - "locked_amount": "2541.2572777777773456", + "locked_amount": "2466.30490740740732208", "deposits": [ { "amount": "111", @@ -4605,7 +4605,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "52591.8412504624188046894", + "locked_amount": "52532.3598535741728398289", "deposits": [ { "amount": "86666.297", @@ -4671,7 +4671,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "473.811908577533575", + "locked_amount": "470.370847323972325", "deposits": [ { "amount": "2500", @@ -4792,7 +4792,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "12030.63245395531275", + "locked_amount": "12006.80684505837325", "deposits": [ { "amount": "12500", @@ -5058,8 +5058,8 @@ "tranche_start": "2023-02-01T00:00:00.000Z", "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", - "total_removed": "12704.026146825", - "locked_amount": "19784.56635589318875", + "total_removed": "17678.335539225", + "locked_amount": "19732.6652662676475", "deposits": [ { "amount": "7500", @@ -5078,6 +5078,11 @@ "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", "tx": "0x4dc6eefb43f5b1704894582aa926f0c6ecd94550ac354b7d5b5f49b0f17261fd" }, + { + "amount": "4974.3093924", + "user": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600", + "tx": "0xfce75d8b6bf0d20cbdb1ef29cfabcae4f4504c30b30ca166b4e66d37f7f04339" + }, { "amount": "126.30064455", "user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b", @@ -5420,6 +5425,12 @@ } ], "withdrawals": [ + { + "amount": "4974.3093924", + "user": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600", + "tranche_id": 34, + "tx": "0xfce75d8b6bf0d20cbdb1ef29cfabcae4f4504c30b30ca166b4e66d37f7f04339" + }, { "amount": "6960.3360957", "user": "0x0B4e6fcE839B01ef43DA6F890FAC7B1Afb004600", @@ -5434,8 +5445,8 @@ } ], "total_tokens": "30000", - "withdrawn_tokens": "9235.4492784", - "remaining_tokens": "20764.5507216" + "withdrawn_tokens": "14209.7586708", + "remaining_tokens": "15790.2413292" } ] }, @@ -5445,7 +5456,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "52543.857812680580054667", + "locked_amount": "52484.430685082756083458", "deposits": [ { "amount": "129999.45", @@ -5478,7 +5489,7 @@ "tranche_end": "2024-04-01T00:00:00.000Z", "total_added": "54144.7663", "total_removed": "0", - "locked_amount": "50223.4879614053898767713", + "locked_amount": "50186.42849337648431156926", "deposits": [ { "amount": "54144.7663", @@ -5511,7 +5522,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "22037.516533485537", + "locked_amount": "21994.5524797057361", "deposits": [ { "amount": "10000", @@ -5704,7 +5715,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "1951.96584855403365", + "locked_amount": "1948.5342148655505", "deposits": [ { "amount": "5000", @@ -6245,7 +6256,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "7280.725809525", - "locked_amount": "434.275725138121845", + "locked_amount": "403.1350713627993", "deposits": [ { "amount": "7500", @@ -6751,7 +6762,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "1709370.7872515768348", - "locked_amount": "188643.4559650818349440268", + "locked_amount": "187312.0312486713071773836", "deposits": [ { "amount": "1852091.69", @@ -12251,7 +12262,7 @@ "tranche_start": "2021-09-03T00:00:00.000Z", "tranche_end": "2022-09-03T00:00:00.000Z", "total_added": "57278.000000000000000003", - "total_removed": "48182.21518131551", + "total_removed": "50196.35141572991", "locked_amount": "0", "deposits": [ { @@ -22836,6 +22847,16 @@ } ], "withdrawals": [ + { + "amount": "725", + "user": "0x52Dd36AB8e8eec8f6bE968E93679838dc73b19D3", + "tx": "0xbc67aa993d42656a84c7da90e6abcc0a3c00e7e9e21da4013251b0f8582567ca" + }, + { + "amount": "1289.1362344144", + "user": "0xab6dE081Af6C78433AFDaC5B756804bcE17e9eC1", + "tx": "0x9e6077e2dc83701a70b2a04028ab533e89cd7f1bb757ea4fe45e1388cfee600d" + }, { "amount": "25", "user": "0x363D3d06d70761c34D6EfEB25E409A9549E6970D", @@ -32345,10 +32366,17 @@ "tx": "0x1a0e42b837a8f3908bc4e36e9b024f48c371b98f066a0db36fd98793cd178f57" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "725", + "user": "0x52Dd36AB8e8eec8f6bE968E93679838dc73b19D3", + "tranche_id": 11, + "tx": "0xbc67aa993d42656a84c7da90e6abcc0a3c00e7e9e21da4013251b0f8582567ca" + } + ], "total_tokens": "725", - "withdrawn_tokens": "0", - "remaining_tokens": "725" + "withdrawn_tokens": "725", + "remaining_tokens": "0" }, { "address": "0xab6dE081Af6C78433AFDaC5B756804bcE17e9eC1", @@ -33051,6 +33079,12 @@ } ], "withdrawals": [ + { + "amount": "1289.1362344144", + "user": "0xab6dE081Af6C78433AFDaC5B756804bcE17e9eC1", + "tranche_id": 11, + "tx": "0x9e6077e2dc83701a70b2a04028ab533e89cd7f1bb757ea4fe45e1388cfee600d" + }, { "amount": "842.29689345648", "user": "0xab6dE081Af6C78433AFDaC5B756804bcE17e9eC1", @@ -33095,8 +33129,8 @@ } ], "total_tokens": "3439", - "withdrawn_tokens": "2149.8637655856", - "remaining_tokens": "1289.1362344144" + "withdrawn_tokens": "3439", + "remaining_tokens": "0" }, { "address": "0x23E18CBa049393DFebC5a17e3b5ec9aF584CAE04", @@ -40578,7 +40612,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "715655.108029600523393", - "locked_amount": "314380.63787207732811164918", + "locked_amount": "312334.701635806482800925758", "deposits": [ { "amount": "1998.95815", @@ -41971,7 +42005,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "864782.86597041115934852", - "locked_amount": "6414461.14236901907061884390331141365044606", + "locked_amount": "6407206.38383686475925178450726816596566644", "deposits": [ { "amount": "16249.93", @@ -48527,7 +48561,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "6130217.967403708954663132", - "locked_amount": "200344.3436236687041787785927410316", + "locked_amount": "193646.7968688536809448427165051816", "deposits": [ { "amount": "129284.449", @@ -58560,7 +58594,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "43935.8732690563416", - "locked_amount": "49815.409147170801381683055403356", + "locked_amount": "49491.218855463579856215150481968", "deposits": [ { "amount": "3000", From 5e558c4cd3c3fecac462b50873119b295f8296c9 Mon Sep 17 00:00:00 2001 From: daro-maj <119658839+daro-maj@users.noreply.github.com> Date: Thu, 27 Apr 2023 21:28:25 +0200 Subject: [PATCH 3/9] test(trading): 7001-COLL-collateral - e2e tests (#3561) Co-authored-by: m.ray <16125548+MadalinaRaicu@users.noreply.github.com> --- .../src/integration/trading-accounts.cy.ts | 82 +++++++++++++++++-- .../trading-deal-ticket-order.cy.ts | 13 +++ .../src/integration/trading-orders.cy.ts | 2 +- libs/accounts/src/lib/accounts-table.tsx | 6 +- 4 files changed, 96 insertions(+), 7 deletions(-) diff --git a/apps/trading-e2e/src/integration/trading-accounts.cy.ts b/apps/trading-e2e/src/integration/trading-accounts.cy.ts index fd0234641..8b337fa8c 100644 --- a/apps/trading-e2e/src/integration/trading-accounts.cy.ts +++ b/apps/trading-e2e/src/integration/trading-accounts.cy.ts @@ -1,17 +1,23 @@ import { checkSorting } from '@vegaprotocol/cypress'; describe('accounts', { tags: '@smoke' }, () => { - before(() => { - cy.clearAllLocalStorage(); + beforeEach(() => { cy.mockTradingPage(); cy.mockWeb3Provider(); cy.mockSubscription(); cy.setVegaWallet(); cy.visit('/#/markets/market-0'); - cy.wait('@Assets'); }); it('renders accounts', () => { + // 7001-COLL-001 + // 7001-COLL-002 + // 7001-COLL-003 + // 7001-COLL-004 + // 7001-COLL-005 + // 7001-COLL-006 + // 7001-COLL-007 + const tradingAccountRowId = '[row-id="t-0"]'; cy.getByTestId('Collateral').click(); @@ -22,6 +28,21 @@ describe('accounts', { tags: '@smoke' }, () => { .find('[col-id="asset.symbol"]') .should('have.text', 'AST0'); + cy.getByTestId('tab-accounts') + .get(tradingAccountRowId) + .find('[col-id="used"]') + .should('have.text', '1.010.00%'); + + cy.getByTestId('tab-accounts') + .get(tradingAccountRowId) + .find('[col-id="available"]') + .should('have.text', '100,000.00'); + + cy.getByTestId('tab-accounts') + .get(tradingAccountRowId) + .find('[col-id="total"]') + .should('have.text', '100,001.01'); + cy.getByTestId('tab-accounts') .get(tradingAccountRowId) .find('[col-id="accounts-actions"]') @@ -31,12 +52,63 @@ describe('accounts', { tags: '@smoke' }, () => { .get(tradingAccountRowId) .find('[col-id="total"]') .should('have.text', '100,001.01'); + + cy.getByTestId('tab-accounts') + .get('[col-id="accounts-actions"]') + .find('[data-testid="dropdown-menu"]') + .eq(1) + .click(); + cy.getByTestId('deposit').should('be.visible'); + cy.getByTestId('withdraw').should('be.visible'); + cy.getByTestId('breakdown').should('be.visible'); + cy.getByTestId('Collateral').click({ force: true }); }); it('should open asset details dialog when clicked on symbol', () => { + // 7001-COLL-008 cy.getByTestId('asset').contains('tEURO').click(); - cy.get('[data-testid="dialog-content"]:visible').should('exist'); - cy.get('[data-testid="dialog-close"]:visible').click(); + cy.get('[data-testid$="_label"]').should('have.length', 16); + cy.get('[data-testid="dialog-close"]').click(); + }); + + it('should open asset details dialog when clicked on symbol', () => { + // 7001-COLL-008 + cy.getByTestId('asset').contains('tEURO').click(); + cy.get('[data-testid$="_label"]').should('have.length', 16); + cy.get('[data-testid="dialog-close"]').click(); + }); + + it('should open usage breakdown dialog when clicked on used', () => { + // 7001-COLL-009 + cy.getByTestId('breakdown').contains('1.01').click(); + const headers = ['Market', 'Account type', 'Balance']; + cy.getByTestId('usage-breakdown').within(($headers) => { + cy.wrap($headers) + .get('.ag-header-cell-text') + .each(($header, i) => { + cy.wrap($header).should('have.text', headers[i]); + }); + }); + cy.get('[data-testid="dialog-close"]').click(); + }); + + it('sorting usage breakdown columns should work well', () => { + // 7001-COLL-010 + cy.getByTestId('breakdown').contains('1.01').click(); + cy.getByTestId('usage-breakdown') + .find('[col-id="type"]') + .eq(1) + .should('have.text', 'Margin'); + cy.getByTestId('usage-breakdown') + .find('[col-id="type"]') + .eq(2) + .should('have.text', 'Margin'); + cy.getByTestId('usage-breakdown') + .find('[col-id="type"]') + .eq(3) + .should('have.text', 'General'); + + cy.get('[data-testid="dialog-close"]').click(); }); describe('sorting by ag-grid columns should work well', () => { diff --git a/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts b/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts index 1c74e5415..418d1c290 100644 --- a/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts +++ b/apps/trading-e2e/src/integration/trading-deal-ticket-order.cy.ts @@ -88,5 +88,18 @@ describe('deal ticker order validation', { tags: '@smoke' }, () => { 'Size cannot be lower than 1' ); }); + it('must have total margin available', () => { + // 7001-COLL-011 + cy.getByTestId('tab-ticket') + .find('.text-xs') + .eq(5) + .within(() => { + cy.get('[data-state="closed"]').should( + 'have.text', + 'Total margin available' + ); + cy.get('.text-neutral-500').should('have.text', '~100,000.01 tDAI'); + }); + }); }); }); diff --git a/apps/trading-e2e/src/integration/trading-orders.cy.ts b/apps/trading-e2e/src/integration/trading-orders.cy.ts index f3a459f7a..8d8524f8b 100644 --- a/apps/trading-e2e/src/integration/trading-orders.cy.ts +++ b/apps/trading-e2e/src/integration/trading-orders.cy.ts @@ -455,7 +455,7 @@ describe('amend and cancel order', { tags: '@smoke' }, () => { }); }); it('must be warned (pre-submit) if the input price has too many digits after the decimal place for the market', () => { - // 7003-MORD-016 + // 7003-MORD-013 updateOrder({ id: orderId, status: Schema.OrderStatus.STATUS_ACTIVE, diff --git a/libs/accounts/src/lib/accounts-table.tsx b/libs/accounts/src/lib/accounts-table.tsx index ff820a428..170abbc17 100644 --- a/libs/accounts/src/lib/accounts-table.tsx +++ b/libs/accounts/src/lib/accounts-table.tsx @@ -299,6 +299,7 @@ export const AccountTable = forwardRef( } > @@ -359,7 +360,10 @@ export const AccountTable = forwardRef( } -
+

{row?.asset?.symbol} {t('usage breakdown')}

From 30c1dbd019e0c7a9301fc190130d35b35d8f11e0 Mon Sep 17 00:00:00 2001 From: dexturr Date: Fri, 28 Apr 2023 00:14:44 +0000 Subject: [PATCH 4/9] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 1ef5e0f95..d420ea970 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-05-20T00:00:00.000Z", "total_added": "19242.125", "total_removed": "494.628795994665", - "locked_amount": "14266.7513944347992639375", + "locked_amount": "14104.3291518132719137625", "deposits": [ { "amount": "188", @@ -822,7 +822,7 @@ "tranche_end": "2023-05-06T00:00:00.000Z", "total_added": "8976", "total_removed": "596.64743517951", - "locked_amount": "2466.30490740740732208", + "locked_amount": "2390.53874074074112416", "deposits": [ { "amount": "111", @@ -4605,7 +4605,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "52532.3598535741728398289", + "locked_amount": "52472.2326366771880209976", "deposits": [ { "amount": "86666.297", @@ -4671,7 +4671,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "470.370847323972325", + "locked_amount": "466.8924247049247", "deposits": [ { "amount": "2500", @@ -4792,7 +4792,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "12006.80684505837325", + "locked_amount": "11982.7225493156195", "deposits": [ { "amount": "12500", @@ -5059,7 +5059,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "17678.335539225", - "locked_amount": "19732.6652662676475", + "locked_amount": "19680.20065991405625", "deposits": [ { "amount": "7500", @@ -5456,7 +5456,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "52484.430685082756083458", + "locked_amount": "52424.358326705700589065", "deposits": [ { "amount": "129999.45", @@ -5489,7 +5489,7 @@ "tranche_end": "2024-04-01T00:00:00.000Z", "total_added": "54144.7663", "total_removed": "0", - "locked_amount": "50186.42849337648431156926", + "locked_amount": "50148.96665171115575795528", "deposits": [ { "amount": "54144.7663", @@ -5522,7 +5522,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "21994.5524797057361", + "locked_amount": "21951.12194317605482", "deposits": [ { "amount": "10000", @@ -5715,7 +5715,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "1948.5342148655505", + "locked_amount": "1945.0653221714865", "deposits": [ { "amount": "5000", @@ -6256,7 +6256,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "7280.725809525", - "locked_amount": "403.1350713627993", + "locked_amount": "371.6563075506434925", "deposits": [ { "amount": "7500", @@ -6762,7 +6762,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "1709370.7872515768348", - "locked_amount": "187312.0312486713071773836", + "locked_amount": "185966.1505717934249501196", "deposits": [ { "amount": "1852091.69", @@ -40612,7 +40612,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "715655.108029600523393", - "locked_amount": "312334.701635806482800925758", + "locked_amount": "310266.551621327718386904753", "deposits": [ { "amount": "1998.95815", @@ -42005,7 +42005,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "864782.86597041115934852", - "locked_amount": "6407206.38383686475925178450726816596566644", + "locked_amount": "6399872.8566734463335734766201054909462017", "deposits": [ { "amount": "16249.93", @@ -48561,7 +48561,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "6130217.967403708954663132", - "locked_amount": "193646.7968688536809448427165051816", + "locked_amount": "186876.53141659908353306365130595", "deposits": [ { "amount": "129284.449", @@ -58594,7 +58594,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "43935.8732690563416", - "locked_amount": "49491.218855463579856215150481968", + "locked_amount": "49163.508663619965925790566007088", "deposits": [ { "amount": "3000", From e4fd040933b236417c9d79768e69e81ac4922b22 Mon Sep 17 00:00:00 2001 From: dexturr Date: Fri, 28 Apr 2023 06:08:57 +0000 Subject: [PATCH 5/9] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 49 ++++++++++++-------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index d420ea970..66747ed7e 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-05-20T00:00:00.000Z", "total_added": "19242.125", "total_removed": "494.628795994665", - "locked_amount": "14104.3291518132719137625", + "locked_amount": "13946.5615435956807465125", "deposits": [ { "amount": "188", @@ -822,7 +822,7 @@ "tranche_end": "2023-05-06T00:00:00.000Z", "total_added": "8976", "total_removed": "596.64743517951", - "locked_amount": "2390.53874074074112416", + "locked_amount": "2316.943851851851464", "deposits": [ { "amount": "111", @@ -4605,7 +4605,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "52472.2326366771880209976", + "locked_amount": "52413.828522526897906274", "deposits": [ { "amount": "86666.297", @@ -4671,7 +4671,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "466.8924247049247", + "locked_amount": "463.513685388685375", "deposits": [ { "amount": "2500", @@ -4792,7 +4792,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "11982.7225493156195", + "locked_amount": "11959.3284520933965", "deposits": [ { "amount": "12500", @@ -5059,7 +5059,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "17678.335539225", - "locked_amount": "19680.20065991405625", + "locked_amount": "19629.239564149785", "deposits": [ { "amount": "7500", @@ -5456,7 +5456,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "52424.358326705700589065", + "locked_amount": "52366.0074989608675515285", "deposits": [ { "amount": "129999.45", @@ -5489,7 +5489,7 @@ "tranche_end": "2024-04-01T00:00:00.000Z", "total_added": "54144.7663", "total_removed": "0", - "locked_amount": "50148.96665171115575795528", + "locked_amount": "50112.57837715237381561549", "deposits": [ { "amount": "54144.7663", @@ -5522,7 +5522,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "21951.12194317605482", + "locked_amount": "21908.93602232369342", "deposits": [ { "amount": "10000", @@ -5715,7 +5715,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "1945.0653221714865", + "locked_amount": "1941.6958396752915", "deposits": [ { "amount": "5000", @@ -6256,7 +6256,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "7280.725809525", - "locked_amount": "371.6563075506434925", + "locked_amount": "341.079650092080135", "deposits": [ { "amount": "7500", @@ -6762,7 +6762,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "1709370.7872515768348", - "locked_amount": "185966.1505717934249501196", + "locked_amount": "184658.8396277372732387052", "deposits": [ { "amount": "1852091.69", @@ -40612,7 +40612,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "715655.108029600523393", - "locked_amount": "310266.551621327718386904753", + "locked_amount": "308257.66985764130666401388", "deposits": [ { "amount": "1998.95815", @@ -42005,7 +42005,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "864782.86597041115934852", - "locked_amount": "6399872.8566734463335734766201054909462017", + "locked_amount": "6392749.49092195080541091690422070752608813", "deposits": [ { "amount": "16249.93", @@ -48561,7 +48561,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "6130217.967403708954663132", - "locked_amount": "186876.53141659908353306365130595", + "locked_amount": "180300.2856379379679487702400136114", "deposits": [ { "amount": "129284.449", @@ -58593,8 +58593,8 @@ "tranche_start": "2022-06-05T00:00:00.000Z", "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", - "total_removed": "43935.8732690563416", - "locked_amount": "49163.508663619965925790566007088", + "total_removed": "43997.0543192803416", + "locked_amount": "48845.189864906103545725365702684", "deposits": [ { "amount": "3000", @@ -65238,6 +65238,11 @@ "user": "0x0a6A5e1da768709A2bF17b2E58B2B73120051D03", "tx": "0x097e43cb4f64f1cb502f321eceb8b91e6378cac0b3b6fe558fc1d543aec597e2" }, + { + "amount": "61.181050224", + "user": "0xe7770271d882C54C46B9f00137e96a3BbfFD4d94", + "tx": "0x3c7d0394e431000fa5c733213116dc39b0f87a9a32a40e75cec3c2fce7795b0b" + }, { "amount": "168.502276762", "user": "0x38A292CB98Dc602ECAFF94E8E5fADD9800e4bA13", @@ -78243,6 +78248,12 @@ } ], "withdrawals": [ + { + "amount": "61.181050224", + "user": "0xe7770271d882C54C46B9f00137e96a3BbfFD4d94", + "tranche_id": 5, + "tx": "0x3c7d0394e431000fa5c733213116dc39b0f87a9a32a40e75cec3c2fce7795b0b" + }, { "amount": "101.521461192", "user": "0xe7770271d882C54C46B9f00137e96a3BbfFD4d94", @@ -78281,8 +78292,8 @@ } ], "total_tokens": "600", - "withdrawn_tokens": "476.48491248", - "remaining_tokens": "123.51508752" + "withdrawn_tokens": "537.665962704", + "remaining_tokens": "62.334037296" }, { "address": "0x79D8ff1699911f065fD97a95a6B47216925C4B0e", From 66d2b835137a4faedd78f1899650b0206436afba Mon Sep 17 00:00:00 2001 From: dexturr Date: Fri, 28 Apr 2023 12:09:23 +0000 Subject: [PATCH 6/9] chore: update tranches Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/static/src/assets/mainnet-tranches.json | 69 +++++++++++++------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 66747ed7e..dc114cbf7 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -37,8 +37,8 @@ "tranche_start": "2023-04-20T00:00:00.000Z", "tranche_end": "2023-05-20T00:00:00.000Z", "total_added": "19242.125", - "total_removed": "494.628795994665", - "locked_amount": "13946.5615435956807465125", + "total_removed": "537.22112238579", + "locked_amount": "13786.0174867862645531375", "deposits": [ { "amount": "188", @@ -226,6 +226,11 @@ "amount": "96.6447222258", "user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756", "tx": "0x13b160a21d48eab98cc304bbb46cd675da08afbf6e0ad261c67c10ba34dc4d74" + }, + { + "amount": "42.592326391125", + "user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756", + "tx": "0x5f544a659ae728cc7b1a29dcda14740425cadf1f47aa74bae92bf2ade3c8093d" } ], "users": [ @@ -281,11 +286,17 @@ "user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756", "tranche_id": 56, "tx": "0x13b160a21d48eab98cc304bbb46cd675da08afbf6e0ad261c67c10ba34dc4d74" + }, + { + "amount": "42.592326391125", + "user": "0x1447Efc62d5077d7AbB20492dF831Dd6c9Eb1756", + "tranche_id": 56, + "tx": "0x5f544a659ae728cc7b1a29dcda14740425cadf1f47aa74bae92bf2ade3c8093d" } ], "total_tokens": "1207.5", - "withdrawn_tokens": "298.738388303775", - "remaining_tokens": "908.761611696225" + "withdrawn_tokens": "341.3307146949", + "remaining_tokens": "866.1692853051" }, { "address": "0x33Ce1D9E53AFb7367E34749517C086405a651a95", @@ -822,7 +833,7 @@ "tranche_end": "2023-05-06T00:00:00.000Z", "total_added": "8976", "total_removed": "596.64743517951", - "locked_amount": "2316.943851851851464", + "locked_amount": "2242.0538148148150032", "deposits": [ { "amount": "111", @@ -1594,7 +1605,7 @@ "tranche_start": "2023-03-06T00:00:00.000Z", "tranche_end": "2023-04-06T00:00:00.000Z", "total_added": "14099", - "total_removed": "3112.49002352036", + "total_removed": "3142.49002352036", "locked_amount": "0", "deposits": [ { @@ -2359,6 +2370,11 @@ } ], "withdrawals": [ + { + "amount": "30", + "user": "0xBe9F912Ad481C61B653463E8F1D2b2b310D49861", + "tx": "0x191a1901917ada560c9c30efd3d24c0ec116b9dc131a6966cc67ad7e3701df3b" + }, { "amount": "30", "user": "0x8499411Bff99ddE9A02903008F917EEa0E27B42A", @@ -2593,10 +2609,17 @@ "tx": "0x20d505a766d3d8e376509ed8003a5b9f35fd0524f0979a5a57c7d3714d01d3e5" } ], - "withdrawals": [], + "withdrawals": [ + { + "amount": "30", + "user": "0xBe9F912Ad481C61B653463E8F1D2b2b310D49861", + "tranche_id": 53, + "tx": "0x191a1901917ada560c9c30efd3d24c0ec116b9dc131a6966cc67ad7e3701df3b" + } + ], "total_tokens": "30", - "withdrawn_tokens": "0", - "remaining_tokens": "30" + "withdrawn_tokens": "30", + "remaining_tokens": "0" }, { "address": "0xA9821681fEF27Ed817DF77E476DDDAf0aDac4443", @@ -4605,7 +4628,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "86666.297", "total_removed": "0", - "locked_amount": "52413.828522526897906274", + "locked_amount": "52354.396592703131652297", "deposits": [ { "amount": "86666.297", @@ -4671,7 +4694,7 @@ "tranche_end": "2023-06-01T00:00:00.000Z", "total_added": "2500", "total_removed": "0", - "locked_amount": "463.513685388685375", + "locked_amount": "460.07548585673575", "deposits": [ { "amount": "2500", @@ -4792,7 +4815,7 @@ "tranche_end": "2023-09-01T00:00:00.000Z", "total_added": "17500", "total_removed": "0", - "locked_amount": "11959.3284520933965", + "locked_amount": "11935.52265750805275", "deposits": [ { "amount": "12500", @@ -5059,7 +5082,7 @@ "tranche_end": "2023-08-01T00:00:00.000Z", "total_added": "37500", "total_removed": "17678.335539225", - "locked_amount": "19629.239564149785", + "locked_amount": "19577.381637507675", "deposits": [ { "amount": "7500", @@ -5456,7 +5479,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "52366.0074989608675515285", + "locked_amount": "52306.629793295059806393", "deposits": [ { "amount": "129999.45", @@ -5489,7 +5512,7 @@ "tranche_end": "2024-04-01T00:00:00.000Z", "total_added": "54144.7663", "total_removed": "0", - "locked_amount": "50112.57837715237381561549", + "locked_amount": "50075.54972923179337511559", "deposits": [ { "amount": "54144.7663", @@ -5522,7 +5545,7 @@ "tranche_end": "2023-09-03T00:00:00.000Z", "total_added": "62600", "total_removed": "0", - "locked_amount": "21908.93602232369342", + "locked_amount": "21866.007699137490576", "deposits": [ { "amount": "10000", @@ -5715,7 +5738,7 @@ "tranche_end": "2023-09-17T00:00:00.000Z", "total_added": "5000", "total_removed": "0", - "locked_amount": "1941.6958396752915", + "locked_amount": "1938.26705986808735", "deposits": [ { "amount": "5000", @@ -6256,7 +6279,7 @@ "tranche_end": "2023-05-01T00:00:00.000Z", "total_added": "22500", "total_removed": "7280.725809525", - "locked_amount": "341.079650092080135", + "locked_amount": "309.9648941068150575", "deposits": [ { "amount": "7500", @@ -6762,7 +6785,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "1709370.7872515768348", - "locked_amount": "184658.8396277372732387052", + "locked_amount": "183328.522176383808038828", "deposits": [ { "amount": "1852091.69", @@ -40612,7 +40635,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "715655.108029600523393", - "locked_amount": "308257.66985764130666401388", + "locked_amount": "306213.435102254068923605253", "deposits": [ { "amount": "1998.95815", @@ -42005,7 +42028,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15870102.715470999700000001", "total_removed": "864782.86597041115934852", - "locked_amount": "6392749.49092195080541091690422070752608813", + "locked_amount": "6385500.76573176443723552685141297101162474", "deposits": [ { "amount": "16249.93", @@ -48561,7 +48584,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "6130217.967403708954663132", - "locked_amount": "180300.2856379379679487702400136114", + "locked_amount": "173608.308825906440421784938704799", "deposits": [ { "amount": "129284.449", @@ -58594,7 +58617,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "43997.0543192803416", - "locked_amount": "48845.189864906103545725365702684", + "locked_amount": "48521.26918257097251294495027906", "deposits": [ { "amount": "3000", From a10f67d7ab5ba56398e93e1124ba8b2015d949d3 Mon Sep 17 00:00:00 2001 From: Edd Date: Fri, 28 Apr 2023 14:08:42 +0100 Subject: [PATCH 7/9] feat(explorer): add epoch to block explorer homepage (#3536) --- apps/explorer-e2e/src/integration/home.cy.js | 64 ++++++------------- .../components/stats-manager/Stats.graphql | 3 + .../stats-manager/__generated__/Stats.ts | 5 +- .../stats-manager/stats-manager.tsx | 14 ++-- libs/network-stats/src/config/stats-fields.ts | 8 ++- 5 files changed, 41 insertions(+), 53 deletions(-) diff --git a/apps/explorer-e2e/src/integration/home.cy.js b/apps/explorer-e2e/src/integration/home.cy.js index 5f9342727..bc8f058dd 100644 --- a/apps/explorer-e2e/src/integration/home.cy.js +++ b/apps/explorer-e2e/src/integration/home.cy.js @@ -9,21 +9,22 @@ context('Home Page', function () { it('should show connected environment stats', function () { const statTitles = { 0: 'Status', - 1: 'Block height', - 2: 'Uptime', - 3: 'Total nodes', - 4: 'Total staked', - 5: 'Backlog', - 6: 'Trades / second', - 7: 'Orders / block', - 8: 'Orders / second', - 9: 'Transactions / block', - 10: 'Block time', - 11: 'Time', - 12: 'App', - 13: 'Tendermint', - 14: 'Up since', - 15: 'Chain ID', + 1: 'Epoch', + 2: 'Block height', + 3: 'Uptime', + 4: 'Total nodes', + 5: 'Total staked', + 6: 'Backlog', + 7: 'Trades / second', + 8: 'Orders / block', + 9: 'Orders / second', + 10: 'Transactions / block', + 11: 'Block time', + 12: 'Time', + 13: 'App', + 14: 'Tendermint', + 15: 'Up since', + 16: 'Chain ID', }; cy.get('[data-testid="stats-title"]') @@ -31,42 +32,13 @@ context('Home Page', function () { cy.wrap($list).should('contain.text', statTitles[index]); }) .then(($list) => { - cy.wrap($list).should('have.length', 16); + cy.wrap($list).should('have.length', 17); }); - - cy.get(statsValue).eq(0).should('contain.text', 'CONNECTED'); - cy.get(statsValue).eq(1).should('not.be.empty'); - cy.get(statsValue) - .eq(2) - .invoke('text') - .should('match', /\d+d \d+h \d+m \d+s/i); - cy.get(statsValue).eq(3).should('contain.text', '2'); - cy.get(statsValue) - .eq(4) - .invoke('text') - .should('match', /\d+\.\d\d(?!\d)/i); - cy.get(statsValue).eq(5).should('contain.text', '0'); - cy.get(statsValue).eq(6).should('contain.text', '0'); - cy.get(statsValue).eq(7).should('contain.text', '0'); - cy.get(statsValue).eq(8).should('contain.text', '0'); - cy.get(statsValue).eq(9).should('not.be.empty'); - cy.get(statsValue).eq(10).should('not.be.empty'); - cy.get(statsValue).eq(11).should('not.be.empty'); - cy.get(statsValue) - .eq(12) - .invoke('text') - .should('match', /v\d+\.\d+\.\d+/i); - cy.get(statsValue) - .eq(13) - .invoke('text') - .should('match', /\d+\.\d+\.\d+/i); - cy.get(statsValue).eq(14).should('not.be.empty'); - cy.get(statsValue).eq(15).should('not.be.empty'); }); it('Block height should be updating', function () { cy.get(statsValue) - .eq(1) + .eq(2) .invoke('text') .then((blockHeightTxt) => { cy.get(statsValue) diff --git a/libs/network-stats/src/components/stats-manager/Stats.graphql b/libs/network-stats/src/components/stats-manager/Stats.graphql index 348d64156..3be3c5840 100644 --- a/libs/network-stats/src/components/stats-manager/Stats.graphql +++ b/libs/network-stats/src/components/stats-manager/Stats.graphql @@ -1,4 +1,7 @@ query Stats { + epoch { + id + } nodeData { stakedTotal totalNodes diff --git a/libs/network-stats/src/components/stats-manager/__generated__/Stats.ts b/libs/network-stats/src/components/stats-manager/__generated__/Stats.ts index 6c2275fa7..d253da9c7 100644 --- a/libs/network-stats/src/components/stats-manager/__generated__/Stats.ts +++ b/libs/network-stats/src/components/stats-manager/__generated__/Stats.ts @@ -6,11 +6,14 @@ const defaultOptions = {} as const; export type StatsQueryVariables = Types.Exact<{ [key: string]: never; }>; -export type StatsQuery = { __typename?: 'Query', nodeData?: { __typename?: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number } | null, statistics: { __typename?: 'Statistics', status: string, blockHeight: string, blockDuration: string, backlogLength: string, txPerBlock: string, tradesPerSecond: string, ordersPerSecond: string, averageOrdersPerBlock: string, vegaTime: any, appVersion: string, chainVersion: string, chainId: string, genesisTime: any } }; +export type StatsQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string }, nodeData?: { __typename?: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number } | null, statistics: { __typename?: 'Statistics', status: string, blockHeight: string, blockDuration: string, backlogLength: string, txPerBlock: string, tradesPerSecond: string, ordersPerSecond: string, averageOrdersPerBlock: string, vegaTime: any, appVersion: string, chainVersion: string, chainId: string, genesisTime: any } }; export const StatsDocument = gql` query Stats { + epoch { + id + } nodeData { stakedTotal totalNodes diff --git a/libs/network-stats/src/components/stats-manager/stats-manager.tsx b/libs/network-stats/src/components/stats-manager/stats-manager.tsx index 2a88d56be..b1de0ff6e 100644 --- a/libs/network-stats/src/components/stats-manager/stats-manager.tsx +++ b/libs/network-stats/src/components/stats-manager/stats-manager.tsx @@ -19,10 +19,14 @@ export const StatsManager = ({ className }: StatsManagerProps) => { return () => stopPolling(); }, [startPolling, stopPolling]); - const getValue = (field: keyof NodeData | keyof Statistics) => - ['stakedTotal', 'totalNodes', 'inactiveNodes'].includes(field) - ? data?.nodeData?.[field as keyof NodeData] - : data?.statistics?.[field as keyof Statistics]; + const getValue = (field: keyof NodeData | keyof Statistics | 'epoch') => { + if (['stakedTotal', 'totalNodes', 'inactiveNodes'].includes(field)) { + return data?.nodeData?.[field as keyof NodeData]; + } else if (field === 'epoch') { + return data?.epoch.id; + } + return data?.statistics?.[field as keyof Statistics]; + }; const panels = fieldsDefinition.map( ({ field, title, description, formatter, goodThreshold }) => ({ @@ -50,7 +54,7 @@ export const StatsManager = ({ className }: StatsManagerProps) => { className={classNames( 'border rounded p-2 relative border-vega-light-200 dark:border-vega-dark-200', { - 'col-span-2': field === 'chainId' || field === 'status', + 'col-span-2': field === 'chainId', }, { 'bg-transparent border-vega-light-200 dark:border-vega-dark-200': diff --git a/libs/network-stats/src/config/stats-fields.ts b/libs/network-stats/src/config/stats-fields.ts index 96f8be4e5..f6b315d84 100644 --- a/libs/network-stats/src/config/stats-fields.ts +++ b/libs/network-stats/src/config/stats-fields.ts @@ -20,7 +20,7 @@ export type FieldValue = any; export type GoodThreshold = (...args: FieldValue[]) => boolean; export interface Stats { - field: keyof NodeData | keyof Statistics; + field: keyof NodeData | keyof Statistics | 'epoch'; title: string; goodThreshold?: GoodThreshold; // eslint-disable-next-line @@ -161,6 +161,11 @@ const VEGA_TIME: Stats = { description: t('The time on the blockchain'), }; +const EPOCH: Stats = { + field: 'epoch', + title: 'Epoch', +}; + const APP_VERSION: Stats = { field: 'appVersion', title: t('App'), @@ -217,6 +222,7 @@ const CHAIN_ID: Stats = { export const fieldsDefinition: Stats[] = [ STATUS, + EPOCH, BLOCK_HEIGHT, UPTIME, TOTAL_NODES, From 77ab719b372ab7d920b1bb80bd40b11adfd94f1e Mon Sep 17 00:00:00 2001 From: Edd Date: Fri, 28 Apr 2023 17:00:49 +0100 Subject: [PATCH 8/9] fix(explorer): fix asset links and deterministic order details (#3567) --- .../src/app/components/links/asset-link/asset-link.tsx | 2 +- .../components/order-details/deterministic-order-details.tsx | 4 ++-- .../src/app/routes/parties/id/components/party-accounts.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/explorer/src/app/components/links/asset-link/asset-link.tsx b/apps/explorer/src/app/components/links/asset-link/asset-link.tsx index 232296b2d..bfaf87def 100644 --- a/apps/explorer/src/app/components/links/asset-link/asset-link.tsx +++ b/apps/explorer/src/app/components/links/asset-link/asset-link.tsx @@ -43,7 +43,7 @@ export const AssetLink = ({ if (asDialog) { open(assetId, e.target as HTMLElement); } else { - navigate(`${Routes.ASSETS}/${asset?.id}`); + navigate(`/${Routes.ASSETS}/${asset?.id}`); } }} {...props} diff --git a/apps/explorer/src/app/components/order-details/deterministic-order-details.tsx b/apps/explorer/src/app/components/order-details/deterministic-order-details.tsx index 7c0dce1f3..2e3b51458 100644 --- a/apps/explorer/src/app/components/order-details/deterministic-order-details.tsx +++ b/apps/explorer/src/app/components/order-details/deterministic-order-details.tsx @@ -9,7 +9,7 @@ import SizeInMarket from '../size-in-market/size-in-market'; export interface DeterministicOrderDetailsProps { id: string; // Version to fetch, with 0 being 'latest' and 1 being 'first'. Defaults to 0 - version?: number; + version?: number | null; } export const wrapperClasses = @@ -28,7 +28,7 @@ export const wrapperClasses = */ const DeterministicOrderDetails = ({ id, - version = 0, + version = null, }: DeterministicOrderDetailsProps) => { const { data, error } = useExplorerDeterministicOrderQuery({ variables: { orderId: id, version }, diff --git a/apps/explorer/src/app/routes/parties/id/components/party-accounts.tsx b/apps/explorer/src/app/routes/parties/id/components/party-accounts.tsx index 5259a7410..1b2c6dc32 100644 --- a/apps/explorer/src/app/routes/parties/id/components/party-accounts.tsx +++ b/apps/explorer/src/app/routes/parties/id/components/party-accounts.tsx @@ -71,7 +71,7 @@ export const PartyAccounts = ({ accounts }: PartyAccountsProps) => { /> - + ); From 473ef3ae83d7cee13a40bde755196383c8c2e2b3 Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Fri, 28 Apr 2023 18:08:36 +0100 Subject: [PATCH 9/9] feat(governance): default font Alpha (#3543) --- apps/governance/src/components/page-templates/app-layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/governance/src/components/page-templates/app-layout.tsx b/apps/governance/src/components/page-templates/app-layout.tsx index a30baa017..ccb9de75f 100644 --- a/apps/governance/src/components/page-templates/app-layout.tsx +++ b/apps/governance/src/components/page-templates/app-layout.tsx @@ -14,7 +14,7 @@ export const AppLayout = ({ children }: AppLayoutProps) => { const { isReadOnly } = useVegaWallet(); const AppLayoutClasses = classNames( 'app w-full max-w-[1500px] mx-auto grid', - 'lg:text-body-large', + 'font-alpha lg:text-body-large', { 'grid-rows-[repeat(2,min-content)_1fr_min-content]': !isReadOnly, 'grid-rows-[repeat(3,min-content)_1fr_min-content]': isReadOnly,