diff --git a/apps/trading/components/market-state/market-state.tsx b/apps/trading/components/market-state/market-state.tsx index 7aa77d584..d5dbb10e8 100644 --- a/apps/trading/components/market-state/market-state.tsx +++ b/apps/trading/components/market-state/market-state.tsx @@ -7,6 +7,8 @@ import * as Schema from '@vegaprotocol/types'; import { HeaderStat } from '../header'; import { useCallback, useRef, useState } from 'react'; import * as constants from '../constants'; +import { DocsLinks } from '@vegaprotocol/environment'; +import { ExternalLink } from '@vegaprotocol/ui-toolkit'; export const MarketState = ({ market }: { market: Market | null }) => { const [marketState, setMarketState] = useState( @@ -90,5 +92,20 @@ const getMarketStateTooltip = (state: Schema.MarketState | null) => { ); } + if (state === Schema.MarketState.STATE_SUSPENDED_VIA_GOVERNANCE) { + return ( +

+ {t( + `This market has been suspended via a governance vote and can be resumed or terminated by further votes.` + )} + {DocsLinks && ( + + {t('Find out more')} + + )} +

+ ); + } + return undefined; }; diff --git a/apps/trading/lib/utils/index.ts b/apps/trading/lib/utils/index.ts index 95c3e7329..b8c02e991 100644 --- a/apps/trading/lib/utils/index.ts +++ b/apps/trading/lib/utils/index.ts @@ -5,6 +5,7 @@ const MARKET_TEMPLATE = [ MarketState.STATE_ACTIVE, MarketState.STATE_SUSPENDED, MarketState.STATE_PENDING, + MarketState.STATE_SUSPENDED_VIA_GOVERNANCE, ]; export const isMarketActive = (state: MarketState) => { diff --git a/libs/deal-ticket/src/components/trading-mode-tooltip/trading-mode-tooltip.tsx b/libs/deal-ticket/src/components/trading-mode-tooltip/trading-mode-tooltip.tsx index e23c0ee28..808970218 100644 --- a/libs/deal-ticket/src/components/trading-mode-tooltip/trading-mode-tooltip.tsx +++ b/libs/deal-ticket/src/components/trading-mode-tooltip/trading-mode-tooltip.tsx @@ -114,6 +114,20 @@ export const TradingModeTooltip = ({ ); } + case Schema.MarketTradingMode.TRADING_MODE_SUSPENDED_VIA_GOVERNANCE: { + return ( +
+ {t( + `This market has been suspended via a governance vote and can be resumed or terminated by further votes.` + )} + {DocsLinks && ( + + {t('Find out more')} + + )} +
+ ); + } case Schema.MarketTradingMode.TRADING_MODE_MONITORING_AUCTION: { switch (trigger) { case Schema.AuctionTrigger.AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET: { diff --git a/libs/environment/src/hooks/use-links.ts b/libs/environment/src/hooks/use-links.ts index c9ea45195..f4d208359 100644 --- a/libs/environment/src/hooks/use-links.ts +++ b/libs/environment/src/hooks/use-links.ts @@ -80,6 +80,7 @@ export const DocsLinks = VEGA_DOCS_URL LIQUIDITY: `${VEGA_DOCS_URL}/concepts/liquidity/provision`, WITHDRAWAL_LIMITS: `${VEGA_DOCS_URL}/concepts/assets/deposits-withdrawals#withdrawal-limits`, VALIDATOR_SCORES_REWARDS: `${VEGA_DOCS_URL}/concepts/vega-chain/validator-scores-and-rewards`, + MARKET_LIFECYCLE: `${VEGA_DOCS_URL}/concepts/trading-on-vega/market-lifecycle`, } : undefined;