diff --git a/libs/positions/src/lib/positions-table.tsx b/libs/positions/src/lib/positions-table.tsx index 58a808cfe..3167e1ef0 100644 --- a/libs/positions/src/lib/positions-table.tsx +++ b/libs/positions/src/lib/positions-table.tsx @@ -30,6 +30,7 @@ import { formatNumber, getDateTimeFormat, addDecimalsFormatNumber, + createDocsLinks, } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; import { AgGridColumn } from 'ag-grid-react'; @@ -422,6 +423,8 @@ export const PNLCell = ({ data, }: VegaICellRendererParams) => { const { VEGA_DOCS_URL } = useEnvironment(); + const LOSS_SOCIALIZATION_LINK = + VEGA_DOCS_URL && createDocsLinks(VEGA_DOCS_URL).LOSS_SOCIALIZATION; if (!data) { return <>-; @@ -446,7 +449,7 @@ export const PNLCell = ({ {t('Lifetime loss socialisation deductions: %s', lossesFormatted)}

{VEGA_DOCS_URL && ( - + {t('Read more about loss socialisation')} )} @@ -473,6 +476,9 @@ export const OpenVolumeCell = ({ return <>{valueFormatted}; } + const POSITION_RESOLUTION_LINK = + VEGA_DOCS_URL && createDocsLinks(VEGA_DOCS_URL).POSITION_RESOLUTION; + return ( {VEGA_DOCS_URL && ( - + {t('Read more about position resolution')} )} diff --git a/libs/utils/src/lib/links.ts b/libs/utils/src/lib/links.ts index 978bb1ca7..7704488e8 100644 --- a/libs/utils/src/lib/links.ts +++ b/libs/utils/src/lib/links.ts @@ -12,6 +12,8 @@ export const createDocsLinks = (docsUrl: string) => ({ VEGA_WALLET_CONCEPTS_URL: `${docsUrl}/concepts/vega-wallet`, PROPOSALS_GUIDE: `${docsUrl}/tutorials/proposals`, 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`, }); export const ExternalLinks = {