fix: governance links to proposals (#2478) (#2480)

* fix: governance links to proposals

* fix:  fix proposals link in governance.cy.js

* fix: fix link for https://vega.xyz/governance
This commit is contained in:
m.ray 2022-12-27 10:18:42 -05:00 committed by GitHub
parent 61457bc24d
commit 485c609791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View File

@ -183,12 +183,12 @@ describe('market info is displayed', { tags: '@smoke' }, () => {
.first()
.should('have.text', 'View governance proposal')
.and('have.attr', 'href')
.and('contain', '/governance/market-0');
.and('contain', '/proposals/market-0');
cy.getByTestId(externalLink)
.eq(1)
.should('have.text', 'Propose a change to market')
.and('have.attr', 'href')
.and('contain', '/governance/propose/update-market');
.and('contain', '/proposals/propose/update-market');
});
afterEach('close toggle', () => {

View File

@ -49,7 +49,7 @@ describe('Market proposal notification', { tags: '@smoke' }, () => {
cy.getByTestId('external-link').should(
'have.attr',
'href',
'https://stagnet3.token.vega.xyz/governance/123'
'https://stagnet3.token.vega.xyz/proposals/123'
);
});
});

View File

@ -106,7 +106,7 @@ describe('markets table', { tags: '@smoke' }, () => {
.and(
'have.attr',
'href',
'https://stagnet3.token.vega.xyz/governance/propose/new-market'
'https://stagnet3.token.vega.xyz/proposals/propose/new-market'
);
});
});

View File

@ -88,12 +88,12 @@ export const useEtherscanLink = () => {
export const BLOG = 'https://blog.vega.xyz/';
// Token pages
export const TOKEN_NEW_MARKET_PROPOSAL = '/governance/propose/new-market';
export const TOKEN_NEW_MARKET_PROPOSAL = '/proposals/propose/new-market';
export const TOKEN_NEW_NETWORK_PARAM_PROPOSAL =
'/governance/propose/network-parameter';
export const TOKEN_GOVERNANCE = '/governance';
export const TOKEN_PROPOSALS = '/governance';
export const TOKEN_PROPOSAL = '/governance/:id';
'/proposals/propose/network-parameter';
export const TOKEN_GOVERNANCE = '/proposals';
export const TOKEN_PROPOSALS = '/proposals';
export const TOKEN_PROPOSAL = '/proposals/:id';
// Explorer pages
export const EXPLORER_TX = '/txs/:hash';

View File

@ -55,7 +55,7 @@ export const useColumnDefs = () => {
const { change } = data?.terms || {};
if (instrumentGuard(change) && VEGA_TOKEN_URL) {
if (data?.id) {
const link = `${VEGA_TOKEN_URL}/governance/${data.id}`;
const link = `${VEGA_TOKEN_URL}/proposals/${data.id}`;
return (
<ExternalLink href={link}>
{change.instrument.code}

View File

@ -26,6 +26,6 @@ export const ExternalLinks = {
};
export const TokenLinks = {
PROPOSAL_PAGE: ':tokenUrl/governance/:proposalId',
UPDATE_PROPOSAL_PAGE: ':tokenUrl/governance/propose/update-market',
PROPOSAL_PAGE: ':tokenUrl/proposals/:proposalId',
UPDATE_PROPOSAL_PAGE: ':tokenUrl/proposals/propose/update-market',
};