diff --git a/components/portfolio/positions/PortfolioPositionBlock.tsx b/components/portfolio/positions/PortfolioPositionBlock.tsx index 6ea0fd55c7..cb0e5646d8 100644 --- a/components/portfolio/positions/PortfolioPositionBlock.tsx +++ b/components/portfolio/positions/PortfolioPositionBlock.tsx @@ -54,7 +54,11 @@ const getMigrationGradientsPerProtocol = ( export const PortfolioPositionBlock = ({ position }: { position: PortfolioPosition }) => { const { t: tPortfolio } = useTranslation('portfolio') - const { EnableRefinance: isRefinanceEnabled, Rays: isRaysEnabled } = useAppConfig('features') + const { + EnableRefinance: isRefinanceEnabled, + Rays: isRaysEnabled, + SkyUpgrade, + } = useAppConfig('features') const resolvedPairId = shouldShowPairId({ collateralToken: position.primaryToken, @@ -87,9 +91,10 @@ export const PortfolioPositionBlock = ({ position }: { position: PortfolioPositi : {} const showSkyBanner = - position.protocol === LendingProtocol.Maker || - [position.primaryToken, position.secondaryToken].includes('DAI') || - [position.primaryToken, position.secondaryToken].includes('MKR') + SkyUpgrade && + (position.protocol === LendingProtocol.Maker || + [position.primaryToken, position.secondaryToken].includes('DAI') || + [position.primaryToken, position.secondaryToken].includes('MKR')) return ( <> diff --git a/components/vault/GeneralManageLayout.tsx b/components/vault/GeneralManageLayout.tsx index f7f9da1e5a..6c7077abdd 100644 --- a/components/vault/GeneralManageLayout.tsx +++ b/components/vault/GeneralManageLayout.tsx @@ -9,6 +9,7 @@ import { VaultNoticesView } from 'features/notices/VaultsNoticesView' import { vaultTypeToSDKType } from 'features/refinance/helpers/vaultTypeToSDKType' import { useMakerRefinanceContextInputs } from 'features/refinance/hooks' import { UpgradeToSkyBanner } from 'features/sky/components/UpgradeToSkyBanner' +import { useAppConfig } from 'helpers/config' import { useTranslation } from 'next-i18next' import React from 'react' import { Box, Card, Grid } from 'theme-ui' @@ -23,6 +24,7 @@ interface GeneralManageLayoutProps { export function GeneralManageLayout({ generalManageVault, chainId }: GeneralManageLayoutProps) { const { t } = useTranslation() + const { SkyUpgrade } = useAppConfig('features') const { ilkData, vault, priceInfo, account } = generalManageVault.state const colRatioPercnentage = vault.collateralizationRatio.times(100).toFixed(2) @@ -75,7 +77,7 @@ export function GeneralManageLayout({ generalManageVault, chainId }: GeneralMana return ( - {isOwner && } + {isOwner && SkyUpgrade && } {headlineElement} )} - {isOwner && } + {isOwner && SkyUpgrade && } () => void }) { - const { ProxyReveal: proxyReveal, LambdaAutomations } = useAppConfig('features') + const { ProxyReveal: proxyReveal, LambdaAutomations, SkyUpgrade } = useAppConfig('features') const { t } = useTranslation() @@ -107,7 +107,8 @@ export function OmniLayoutController({ txHandler }: { txHandler: () => () => voi : false const showSkyBanner = - [quoteToken, collateralToken].includes('DAI') || [quoteToken, collateralToken].includes('MKR') + SkyUpgrade && + ([quoteToken, collateralToken].includes('DAI') || [quoteToken, collateralToken].includes('MKR')) return (