diff --git a/apps/trading/.env b/apps/trading/.env index d0876bb56..77d86f56c 100644 --- a/apps/trading/.env +++ b/apps/trading/.env @@ -22,7 +22,12 @@ NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72 NX_SUCCESSOR_MARKETS=true NX_STOP_ORDERS=true NX_ICEBERG_ORDERS=true -# NX_PRODUCT_PERPETUALS NX_METAMASK_SNAPS=true NX_REFERRALS=true -NX_TEAM_COMPETITION=true +# NX_DISABLE_CLOSE_POSITION=false + +NX_TENDERMINT_URL=https://be.vega.community +NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket + +NX_CHARTING_LIBRARY_PATH=https://assets.vega.community/trading-view-bundle/v0.0.1/ +NX_CHARTING_LIBRARY_HASH=PDjWaqPFndDp+LCvqbKvntWriaqNzNpZ5i9R/BULzCg= diff --git a/apps/trading/components/chart-container/use-chart-settings.ts b/apps/trading/components/chart-container/use-chart-settings.ts index fb33b3297..0349faba7 100644 --- a/apps/trading/components/chart-container/use-chart-settings.ts +++ b/apps/trading/components/chart-container/use-chart-settings.ts @@ -30,7 +30,7 @@ const STUDY_ORDER: Study[] = [ ]; export const DEFAULT_CHART_SETTINGS = { - chartlib: 'pennant' as const, + chartlib: 'tradingview' as const, interval: Interval.INTERVAL_I15M, type: ChartType.CANDLE, overlays: [Overlay.MOVING_AVERAGE], diff --git a/libs/react-helpers/src/hooks/use-theme-switcher.ts b/libs/react-helpers/src/hooks/use-theme-switcher.ts index cc160dfe7..d9fcd409c 100644 --- a/libs/react-helpers/src/hooks/use-theme-switcher.ts +++ b/libs/react-helpers/src/hooks/use-theme-switcher.ts @@ -42,12 +42,7 @@ const getCurrentTheme = () => { return storedTheme; } - const theme = - isBrowser && - typeof window.matchMedia === 'function' && // jest test environment matchMedia is undefined - window.matchMedia('(prefers-color-scheme: dark)').matches - ? Themes.DARK - : Themes.LIGHT; + const theme = Themes.DARK; setThemeClassName(theme); return theme; diff --git a/libs/trading-view/src/lib/trading-view.tsx b/libs/trading-view/src/lib/trading-view.tsx index c4325fb00..4d7470fff 100644 --- a/libs/trading-view/src/lib/trading-view.tsx +++ b/libs/trading-view/src/lib/trading-view.tsx @@ -100,12 +100,12 @@ export const TradingView = ({ }, // No theme in deps to avoid full chart reload when the theme changes - // Instead the theme is changed programmitcally in a separate useEffect + // Instead the theme is changed programmatically in a separate useEffect // eslint-disable-next-line react-hooks/exhaustive-deps [datafeed, marketId, language, libraryPath, isMobile] ); - // Update the trading view theme every time the app theme updates, doen separately + // Update the trading view theme every time the app theme updates, done separately // to avoid full chart reload useEffect(() => { if (!widgetRef.current || !widgetRef.current._ready) return;