diff --git a/apps/explorer/src/app/components/header/header.spec.tsx b/apps/explorer/src/app/components/header/header.spec.tsx index 3dab8fca6..7566ee613 100644 --- a/apps/explorer/src/app/components/header/header.spec.tsx +++ b/apps/explorer/src/app/components/header/header.spec.tsx @@ -3,6 +3,7 @@ import { Header } from './header'; import { MemoryRouter } from 'react-router-dom'; jest.mock('@vegaprotocol/environment', () => ({ + ...jest.requireActual('@vegaprotocol/environment'), NetworkSwitcher: () => (
NetworkSwitcher
), diff --git a/apps/governance/src/components/vega-wallet/download-wallet-prompt.tsx b/apps/governance/src/components/vega-wallet/download-wallet-prompt.tsx index 6dd9f567e..8f6cb5c47 100644 --- a/apps/governance/src/components/vega-wallet/download-wallet-prompt.tsx +++ b/apps/governance/src/components/vega-wallet/download-wallet-prompt.tsx @@ -1,6 +1,6 @@ import { Link } from '@vegaprotocol/ui-toolkit'; import { useTranslation } from 'react-i18next'; -import { ExternalLinks } from '@vegaprotocol/utils'; +import { ExternalLinks } from '@vegaprotocol/environment'; export const DownloadWalletPrompt = () => { const { t } = useTranslation(); diff --git a/apps/governance/src/routes/home/index.tsx b/apps/governance/src/routes/home/index.tsx index 00ffd171c..b5b2a485c 100644 --- a/apps/governance/src/routes/home/index.tsx +++ b/apps/governance/src/routes/home/index.tsx @@ -12,7 +12,8 @@ import { useRefreshAfterEpoch } from '../../hooks/use-refresh-after-epoch'; import { ProposalsListItem } from '../proposals/components/proposals-list-item'; import { ProtocolUpgradeProposalsListItem } from '../proposals/components/protocol-upgrade-proposals-list-item/protocol-upgrade-proposals-list-item'; import Routes from '../routes'; -import { ExternalLinks, removePaginationWrapper } from '@vegaprotocol/utils'; +import { ExternalLinks } from '@vegaprotocol/environment'; +import { removePaginationWrapper } from '@vegaprotocol/utils'; import { useNodesQuery } from '../staking/home/__generated__/Nodes'; import { useProposalsQuery } from '../proposals/proposals/__generated__/Proposals'; import { diff --git a/apps/governance/src/routes/proposals/components/proposals-list/proposals-list.tsx b/apps/governance/src/routes/proposals/components/proposals-list/proposals-list.tsx index d96fccc7f..db1490391 100644 --- a/apps/governance/src/routes/proposals/components/proposals-list/proposals-list.tsx +++ b/apps/governance/src/routes/proposals/components/proposals-list/proposals-list.tsx @@ -8,12 +8,11 @@ import { ProposalsListFilter } from '../proposals-list-filter'; import Routes from '../../../routes'; import { Button, VegaIcon, VegaIconNames } from '@vegaprotocol/ui-toolkit'; import { Link } from 'react-router-dom'; -import { createDocsLinks, ExternalLinks } from '@vegaprotocol/utils'; import { ExternalLink } from '@vegaprotocol/ui-toolkit'; import type { ProposalQuery } from '../../proposal/__generated__/Proposal'; import type { ProposalFieldsFragment } from '../../proposals/__generated__/Proposals'; import type { ProtocolUpgradeProposalFieldsFragment } from '@vegaprotocol/proposals'; -import { useEnvironment } from '@vegaprotocol/environment'; +import { DocsLinks, ExternalLinks } from '@vegaprotocol/environment'; interface ProposalsListProps { proposals: Array; @@ -36,7 +35,6 @@ export const ProposalsList = ({ protocolUpgradeProposals, lastBlockHeight, }: ProposalsListProps) => { - const { VEGA_DOCS_URL } = useEnvironment(); const { t } = useTranslation(); const [filterString, setFilterString] = useState(''); const sortedProposals = proposals.reduce( @@ -83,9 +81,9 @@ export const ProposalsList = ({ marginBottom={false} title={t('pageTitleProposals')} /> - {VEGA_DOCS_URL && ( + {DocsLinks && (
- +