From ef2afdd34715f3d56237404c3042e105db51a2c4 Mon Sep 17 00:00:00 2001 From: Evgeny Taktarov Date: Thu, 26 Sep 2024 14:41:32 +0700 Subject: [PATCH] fix: link roots --- env-dynamics.mjs | 23 ++++++++++++++-------- shared/banners/dvv-banner/dvv-banner.tsx | 4 ++-- shared/banners/vaults-banner-info/const.ts | 4 +++- utilsApi/metrics/startup-metrics.ts | 2 ++ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/env-dynamics.mjs b/env-dynamics.mjs index 3c273329..a1afe568 100644 --- a/env-dynamics.mjs +++ b/env-dynamics.mjs @@ -35,7 +35,12 @@ export const helpOrigin = process.env.HELP_ORIGIN || 'https://help.lido.fi'; // Fix in the build time (build time don't have env vars) /** @type string */ -export const researchOrigin = process.env.RESEARCH_ORIGIN || 'https://research.lido.fi'; +export const researchOrigin = + process.env.RESEARCH_ORIGIN || 'https://research.lido.fi'; +// Fix in the build time (build time don't have env vars) + +/** @type string */ +export const blogOrigin = process.env.RESEARCH_ORIGIN || 'https://blog.lido.fi'; // Fix in the build time (build time don't have env vars) // Keep fallback as in 'config/get-secret-config.ts' @@ -47,13 +52,17 @@ export const supportedChains = process.env?.SUPPORTED_CHAINS?.split(',').map( ) ?? [17000]; /** @type string[] */ -export const prefillUnsafeElRpcUrls1 = process.env.PREFILL_UNSAFE_EL_RPC_URLS_1?.split(',') ?? []; +export const prefillUnsafeElRpcUrls1 = + process.env.PREFILL_UNSAFE_EL_RPC_URLS_1?.split(',') ?? []; /** @type string[] */ -export const prefillUnsafeElRpcUrls17000 = process.env.PREFILL_UNSAFE_EL_RPC_URLS_17000?.split(',') ?? []; +export const prefillUnsafeElRpcUrls17000 = + process.env.PREFILL_UNSAFE_EL_RPC_URLS_17000?.split(',') ?? []; /** @type string[] */ -export const prefillUnsafeElRpcUrls11155111 = process.env.PREFILL_UNSAFE_EL_RPC_URLS_11155111?.split(',') ?? []; +export const prefillUnsafeElRpcUrls11155111 = + process.env.PREFILL_UNSAFE_EL_RPC_URLS_11155111?.split(',') ?? []; /** @type string[] */ -export const prefillUnsafeElRpcUrls11155420 = process.env.PREFILL_UNSAFE_EL_RPC_URLS_11155420?.split(',') ?? []; +export const prefillUnsafeElRpcUrls11155420 = + process.env.PREFILL_UNSAFE_EL_RPC_URLS_11155420?.split(',') ?? []; /** @type boolean */ export const enableQaHelpers = toBoolean(process.env.ENABLE_QA_HELPERS); @@ -75,6 +84,4 @@ export const widgetApiBasePathForIpfs = process.env.WIDGET_API_BASE_PATH_FOR_IPFS; /** @type string */ -export const rewardsBackendBasePath = - process.env.REWARDS_BACKEND_BASE_PATH; - +export const rewardsBackendBasePath = process.env.REWARDS_BACKEND_BASE_PATH; diff --git a/shared/banners/dvv-banner/dvv-banner.tsx b/shared/banners/dvv-banner/dvv-banner.tsx index abc5992f..576d62dd 100644 --- a/shared/banners/dvv-banner/dvv-banner.tsx +++ b/shared/banners/dvv-banner/dvv-banner.tsx @@ -20,9 +20,9 @@ import { ReactComponent as IconPartnersLogoDark } from 'assets/dvv-banner/dvv-ba import { trackEvent } from '@lidofinance/analytics-matomo'; import { MATOMO_CLICK_EVENTS } from 'consts/matomo-click-events'; +import { config } from 'config'; -const LINK_DVV_VAULT = - 'https://blog.lido.fi/decentralized-validator-vault-mellow-obol-ssv/'; +const LINK_DVV_VAULT = `${config.blogOrigin}/decentralized-validator-vault-mellow-obol-ssv/`; const LINK_PROCEED_BUTTON = 'https://app.mellow.finance/vaults/ethereum-dvsteth'; diff --git a/shared/banners/vaults-banner-info/const.ts b/shared/banners/vaults-banner-info/const.ts index 90e7c724..bcf7a13d 100644 --- a/shared/banners/vaults-banner-info/const.ts +++ b/shared/banners/vaults-banner-info/const.ts @@ -1 +1,3 @@ -export const LINK_EXPLORE_STRATEGIES = 'https://lido.fi/#defi-strategies'; +import { config } from 'config'; + +export const LINK_EXPLORE_STRATEGIES = `${config.rootOrigin}/#defi-strategies`; diff --git a/utilsApi/metrics/startup-metrics.ts b/utilsApi/metrics/startup-metrics.ts index baaf99bf..2541c597 100644 --- a/utilsApi/metrics/startup-metrics.ts +++ b/utilsApi/metrics/startup-metrics.ts @@ -58,6 +58,8 @@ const collectEnvInfoMetrics = (registry: Registry): void => { export const collectStartupMetrics = async ( registry: Registry, ): Promise => { + // conflicts with HMR + if (config.developmentMode) return; collectEnvInfoMetrics(registry); collectBuildInfoMetrics({