diff --git a/apps/trading/client-pages/liquidity/liquidity.tsx b/apps/trading/client-pages/liquidity/liquidity.tsx index 64f53225e..bd49dc81d 100644 --- a/apps/trading/client-pages/liquidity/liquidity.tsx +++ b/apps/trading/client-pages/liquidity/liquidity.tsx @@ -8,6 +8,7 @@ import { import { tooltipMapping } from '@vegaprotocol/market-info'; import { addDecimalsFormatNumber, + createDocsLinks, formatNumberPercentage, } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; @@ -23,6 +24,7 @@ import { Tabs, Link as UiToolkitLink, Indicator, + ExternalLink, } from '@vegaprotocol/ui-toolkit'; import { useVegaWallet } from '@vegaprotocol/wallet'; import { memo, useCallback, useEffect, useRef, useState } from 'react'; @@ -37,6 +39,7 @@ import { Link, useParams } from 'react-router-dom'; import { Links, Routes } from '../../pages/client-router'; import { useMarket, useStaticMarketData } from '@vegaprotocol/market-list'; +import { useEnvironment } from '@vegaprotocol/environment'; const enum LiquidityTabs { Active = 'active', @@ -144,6 +147,7 @@ const LiquidityViewHeader = memo(({ marketId }: { marketId?: string }) => { market?.tradableInstrument.instrument.product.settlementAsset.decimals || 0; const symbol = market?.tradableInstrument.instrument.product.settlementAsset.symbol; + const { VEGA_DOCS_URL } = useEnvironment(); const { params } = useNetworkParams([ NetworkParams.market_liquidity_stakeToCcyVolume, @@ -211,6 +215,13 @@ const LiquidityViewHeader = memo(({ marketId }: { marketId?: string }) => {
{marketId}
+ + {VEGA_DOCS_URL && ( + + {t('Providing liquidity')} + + )} + ); }); diff --git a/apps/trading/components/liquidity-supplied/liquidity-supplied.tsx b/apps/trading/components/liquidity-supplied/liquidity-supplied.tsx index fb0dc251d..b33d25521 100644 --- a/apps/trading/components/liquidity-supplied/liquidity-supplied.tsx +++ b/apps/trading/components/liquidity-supplied/liquidity-supplied.tsx @@ -8,6 +8,7 @@ import type { MarketData } from '@vegaprotocol/market-list'; import { marketDataProvider, marketProvider } from '@vegaprotocol/market-list'; import { HeaderStat } from '../header'; import { + ExternalLink, Indicator, KeyValueTable, KeyValueTableRow, @@ -18,9 +19,11 @@ import { useCheckLiquidityStatus } from '@vegaprotocol/liquidity'; import { AuctionTrigger, MarketTradingMode } from '@vegaprotocol/types'; import { addDecimalsFormatNumber, + createDocsLinks, formatNumberPercentage, } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; +import { useEnvironment } from '@vegaprotocol/environment'; interface Props { marketId?: string; @@ -44,6 +47,8 @@ export const MarketLiquiditySupplied = ({ params.market_liquidity_targetstake_triggering_ratio ); + const { VEGA_DOCS_URL } = useEnvironment(); + const variables = useMemo( () => ({ marketId: marketId || '', @@ -126,6 +131,14 @@ export const MarketLiquiditySupplied = ({ {t('View liquidity provision table')} + {VEGA_DOCS_URL && ( + + {t('Learn about providing liquidity')} + + )} {showMessage && (

{t( diff --git a/libs/utils/src/lib/links.ts b/libs/utils/src/lib/links.ts index 043b29631..b3c8bce97 100644 --- a/libs/utils/src/lib/links.ts +++ b/libs/utils/src/lib/links.ts @@ -15,6 +15,7 @@ export const createDocsLinks = (docsUrl: string) => ({ NODE_OPERATORS: `${docsUrl}/node-operators`, LOSS_SOCIALIZATION: `${docsUrl}/concepts/trading-on-vega/market-protections#loss-socialisation`, POSITION_RESOLUTION: `${docsUrl}/concepts/trading-on-vega/market-protections#position-resolution`, + LIQUIDITY: `${docsUrl}/concepts/liquidity/provision`, }); export const ExternalLinks = {