From 33ff038ce1cbb888fa4f69703e30f4f673ddc5b3 Mon Sep 17 00:00:00 2001 From: moo-onthelawn <70078372+moo-onthelawn@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:15:59 -0400 Subject: [PATCH] chore: clean up isstaking flag, update profile page (#774) --- public/configs/v1/env.json | 48 ++-- src/App.tsx | 14 +- src/constants/routes.ts | 7 - src/hooks/useEnvFeatures.ts | 1 - src/hooks/useNotificationTypes.tsx | 24 +- src/layout/Header/HeaderDesktop.tsx | 8 +- src/pages/Profile.tsx | 38 ++-- .../token/{rewards => }/GeoblockedPanel.tsx | 0 src/pages/token/Governance.tsx | 61 ------ .../token/{rewards => }/GovernancePanel.tsx | 4 +- .../{rewards => }/LaunchIncentivesPanel.tsx | 0 .../token/{rewards => }/MigratePanel.tsx | 0 .../token/{rewards => }/NewMarketsPanel.tsx | 43 ++-- .../{rewards => }/RewardHistoryPanel.tsx | 0 .../token/{rewards => }/RewardsHelpPanel.tsx | 62 +++--- .../token/{rewards => }/RewardsNavPanel.tsx | 22 +- src/pages/token/{rewards => }/RewardsPage.tsx | 101 ++++----- .../token/{rewards => }/StakingPanel.tsx | 0 .../{rewards => }/StakingRewardPanel.tsx | 0 src/pages/token/Token.tsx | 119 ---------- .../TradingRewardsChartPanel.tsx | 0 .../TradingRewardsSummaryPanel.tsx | 0 .../token/{rewards => }/UnbondingPanels.tsx | 0 src/pages/token/rewards/DYDXBalancePanel.tsx | 206 ------------------ src/pages/token/staking/StakingPage.tsx | 71 ------ src/pages/token/staking/StakingPanel.tsx | 74 ------- .../token/staking/StrideStakingPanel.tsx | 87 -------- src/views/ExchangeBillboards.tsx | 7 +- 28 files changed, 141 insertions(+), 856 deletions(-) rename src/pages/token/{rewards => }/GeoblockedPanel.tsx (100%) delete mode 100644 src/pages/token/Governance.tsx rename src/pages/token/{rewards => }/GovernancePanel.tsx (82%) rename src/pages/token/{rewards => }/LaunchIncentivesPanel.tsx (100%) rename src/pages/token/{rewards => }/MigratePanel.tsx (100%) rename src/pages/token/{rewards => }/NewMarketsPanel.tsx (61%) rename src/pages/token/{rewards => }/RewardHistoryPanel.tsx (100%) rename src/pages/token/{rewards => }/RewardsHelpPanel.tsx (65%) rename src/pages/token/{rewards => }/RewardsNavPanel.tsx (80%) rename src/pages/token/{rewards => }/RewardsPage.tsx (68%) rename src/pages/token/{rewards => }/StakingPanel.tsx (100%) rename src/pages/token/{rewards => }/StakingRewardPanel.tsx (100%) delete mode 100644 src/pages/token/Token.tsx rename src/pages/token/{rewards => }/TradingRewardsChartPanel.tsx (100%) rename src/pages/token/{rewards => }/TradingRewardsSummaryPanel.tsx (100%) rename src/pages/token/{rewards => }/UnbondingPanels.tsx (100%) delete mode 100644 src/pages/token/rewards/DYDXBalancePanel.tsx delete mode 100644 src/pages/token/staking/StakingPage.tsx delete mode 100644 src/pages/token/staking/StakingPanel.tsx delete mode 100644 src/pages/token/staking/StrideStakingPanel.tsx diff --git a/public/configs/v1/env.json b/public/configs/v1/env.json index d882d3816..eeeeeb865 100644 --- a/public/configs/v1/env.json +++ b/public/configs/v1/env.json @@ -315,8 +315,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-dev-2": { @@ -353,8 +352,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-dev-3": { @@ -393,8 +391,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-dev-4": { @@ -433,8 +430,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-dev-5": { @@ -471,8 +467,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-staging": { @@ -510,8 +505,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-staging-forced-update": { @@ -561,8 +555,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-staging-west": { @@ -600,8 +593,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet": { @@ -647,8 +639,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-dydx": { @@ -686,8 +677,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-nodefleet": { @@ -726,8 +716,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-kingnodes": { @@ -765,8 +754,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-liquify": { @@ -805,8 +793,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-polkachu": { @@ -845,8 +832,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-testnet-bware": { @@ -885,8 +871,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } }, "dydxprotocol-mainnet": { @@ -925,8 +910,7 @@ "CCTPWithdrawalOnly": true, "CCTPDepositOnly": true, "isSlTpEnabled": true, - "isSlTpLimitOrdersEnabled": false, - "isStakingEnabled": true + "isSlTpLimitOrdersEnabled": false } } } diff --git a/src/App.tsx b/src/App.tsx index 286531df8..420465cf4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -40,11 +40,8 @@ import { GlobalCommandDialog } from '@/views/dialogs/GlobalCommandDialog'; import { parseLocationHash } from '@/lib/urlUtils'; import { config, configureChainsConfig, privyConfig } from '@/lib/wagmi'; -import { ComplianceStates } from './constants/compliance'; import { useAnalytics } from './hooks/useAnalytics'; import { useBreakpoints } from './hooks/useBreakpoints'; -import { useComplianceState } from './hooks/useComplianceState'; -import { useEnvFeatures } from './hooks/useEnvFeatures'; import { useInitializePage } from './hooks/useInitializePage'; import { useShouldShowFooter } from './hooks/useShouldShowFooter'; import { useTokenConfigs } from './hooks/useTokenConfigs'; @@ -59,7 +56,7 @@ const SettingsPage = lazy(() => import('@/pages/settings/Settings')); const TradePage = lazy(() => import('@/pages/trade/Trade')); const TermsOfUsePage = lazy(() => import('@/pages/TermsOfUsePage')); const PrivacyPolicyPage = lazy(() => import('@/pages/PrivacyPolicyPage')); -const TokenPage = lazy(() => import('@/pages/token/Token')); +const RewardsPage = lazy(() => import('@/pages/token/RewardsPage')); const VaultsPage = lazy(() => import('@/pages/vaults/Vaults')); const queryClient = new QueryClient(); @@ -69,8 +66,6 @@ const Content = () => { useAnalytics(); const { isTablet, isNotTablet } = useBreakpoints(); - const { complianceState } = useComplianceState(); - const { isStakingEnabled } = useEnvFeatures(); const { chainTokenLabel } = useTokenConfigs(); const location = useLocation(); @@ -86,8 +81,6 @@ const Content = () => { const { dialogAreaRef } = useDialogArea() ?? {}; - const showChainTokenPage = complianceState === ComplianceStates.FULL_ACCESS || isStakingEnabled; - return ( <> @@ -107,10 +100,7 @@ const Content = () => { } /> - : } - /> + } /> {isTablet && ( <> diff --git a/src/constants/routes.ts b/src/constants/routes.ts index 5032baa27..69e1093df 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -29,13 +29,6 @@ export enum HistoryRoute { Payments = 'payments', } -// OTE-459: Deprecate this route -export enum TokenRoute { - TradingRewards = 'trading-rewards', - StakingRewards = 'staking-rewards', - Governance = 'governance', -} - export enum MobileSettingsRoute { Language = 'language', Notifications = 'notifications', diff --git a/src/hooks/useEnvFeatures.ts b/src/hooks/useEnvFeatures.ts index 18557eebb..2479176b6 100644 --- a/src/hooks/useEnvFeatures.ts +++ b/src/hooks/useEnvFeatures.ts @@ -11,7 +11,6 @@ export interface EnvironmentFeatures { CCTPDepositOnly: boolean; isSlTpEnabled: boolean; isSlTpLimitOrdersEnabled: boolean; - isStakingEnabled: boolean; } export const useEnvFeatures = (): EnvironmentFeatures => { diff --git a/src/hooks/useNotificationTypes.tsx b/src/hooks/useNotificationTypes.tsx index 9a81b6c6c..2898471eb 100644 --- a/src/hooks/useNotificationTypes.tsx +++ b/src/hooks/useNotificationTypes.tsx @@ -27,7 +27,7 @@ import { TransferNotificationTypes, type NotificationTypeConfig, } from '@/constants/notifications'; -import { AppRoute, TokenRoute } from '@/constants/routes'; +import { AppRoute } from '@/constants/routes'; import { DydxChainAsset } from '@/constants/wallets'; import { useLocalNotifications } from '@/hooks/useLocalNotifications'; @@ -62,7 +62,6 @@ import { formatSeconds } from '@/lib/timeUtils'; import { useAccounts } from './useAccounts'; import { useApiState } from './useApiState'; import { useComplianceState } from './useComplianceState'; -import { useEnvFeatures } from './useEnvFeatures'; import { useQueryChaosLabsIncentives } from './useQueryChaosLabsIncentives'; import { useStringGetter } from './useStringGetter'; import { useTokenConfigs } from './useTokenConfigs'; @@ -276,7 +275,6 @@ export const notificationTypes: NotificationTypeConfig[] = [ useTrigger: ({ trigger }) => { const { chainTokenLabel } = useTokenConfigs(); const stringGetter = useStringGetter(); - const { isStakingEnabled } = useEnvFeatures(); const incentivesExpirationDate = new Date('2024-07-17T23:59:59'); const conditionalOrdersExpirationDate = new Date('2024-06-01T23:59:59'); @@ -385,7 +383,7 @@ export const notificationTypes: NotificationTypeConfig[] = [ ); } - if (isStakingEnabled && currentDate <= stakingLiveExpirationDate) { + if (currentDate <= stakingLiveExpirationDate) { trigger( ReleaseUpdateNotificationIds.InAppStakingLive, { @@ -449,23 +447,15 @@ export const notificationTypes: NotificationTypeConfig[] = [ }, useNotificationAction: () => { const { chainTokenLabel } = useTokenConfigs(); - const { isStakingEnabled } = useEnvFeatures(); const navigate = useNavigate(); return (notificationId: string) => { - if (notificationId === INCENTIVES_SEASON_NOTIFICATION_ID) { - if (isStakingEnabled) { - navigate(`${chainTokenLabel}`); - } else { - navigate(`${chainTokenLabel}/${TokenRoute.TradingRewards}`); - } - } else if (notificationId === INCENTIVES_DISTRIBUTED_NOTIFICATION_ID) { - if (isStakingEnabled) { - navigate(`${chainTokenLabel}`); - } else { - navigate(`${chainTokenLabel}/${TokenRoute.StakingRewards}`); - } + if ( + notificationId === INCENTIVES_SEASON_NOTIFICATION_ID || + notificationId === INCENTIVES_DISTRIBUTED_NOTIFICATION_ID + ) { + navigate(`${chainTokenLabel}`); } }; }, diff --git a/src/layout/Header/HeaderDesktop.tsx b/src/layout/Header/HeaderDesktop.tsx index b2d583d27..cfad56e86 100644 --- a/src/layout/Header/HeaderDesktop.tsx +++ b/src/layout/Header/HeaderDesktop.tsx @@ -3,13 +3,10 @@ import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { ButtonShape } from '@/constants/buttons'; -import { ComplianceStates } from '@/constants/compliance'; import { DialogTypes } from '@/constants/dialogs'; import { STRING_KEYS } from '@/constants/localization'; import { AppRoute } from '@/constants/routes'; -import { useComplianceState } from '@/hooks/useComplianceState'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; import { useStringGetter } from '@/hooks/useStringGetter'; import { useTokenConfigs } from '@/hooks/useTokenConfigs'; import { useURLConfigs } from '@/hooks/useURLConfigs'; @@ -39,14 +36,11 @@ import { testFlags } from '@/lib/testFlags'; export const HeaderDesktop = () => { const stringGetter = useStringGetter(); - const { isStakingEnabled } = useEnvFeatures(); const { documentation, community, mintscanBase, exchangeStats } = useURLConfigs(); const dispatch = useAppDispatch(); const { chainTokenLabel } = useTokenConfigs(); - const { complianceState } = useComplianceState(); const hasSeenLaunchIncentives = useAppSelector(getHasSeenLaunchIncentives); - const showChainTokenPage = complianceState === ComplianceStates.FULL_ACCESS || isStakingEnabled; const showVaults = testFlags.enableVaults; const navItems = [ @@ -78,7 +72,7 @@ export const HeaderDesktop = () => { ), href: AppRoute.Vaults, }, - showChainTokenPage && { + { value: chainTokenLabel, label: chainTokenLabel, href: `/${chainTokenLabel}`, diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index da94a5b99..a7b44a9b0 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -36,12 +36,11 @@ import { openDialog } from '@/state/dialogs'; import { isTruthy } from '@/lib/isTruthy'; import { truncateAddress } from '@/lib/wallet'; -import { DYDXBalancePanel } from './token/rewards/DYDXBalancePanel'; -import { GovernancePanel } from './token/rewards/GovernancePanel'; -import { MigratePanel } from './token/rewards/MigratePanel'; -import { NewMarketsPanel } from './token/rewards/NewMarketsPanel'; -import { StakingPanel } from './token/staking/StakingPanel'; -import { StrideStakingPanel } from './token/staking/StrideStakingPanel'; +import { GovernancePanel } from './token/GovernancePanel'; +import { LaunchIncentivesPanel } from './token/LaunchIncentivesPanel'; +import { MigratePanel } from './token/MigratePanel'; +import { NewMarketsPanel } from './token/NewMarketsPanel'; +import { StakingPanel } from './token/StakingPanel'; const ENS_CHAIN_ID = 1; // Ethereum @@ -190,7 +189,7 @@ const Profile = () => { <$MigratePanel /> - <$DYDXBalancePanel /> + <$StakingPanel /> <$RewardsPanel slotHeaderContent={stringGetter({ key: STRING_KEYS.TRADING_REWARDS })} @@ -245,11 +244,9 @@ const Profile = () => { initialPageSize={5} /> - + <$LaunchIncentivesPanel /> <$GovernancePanel /> <$NewMarketsPanel /> - <$StakingPanel /> - <$StrideStakingPanel /> ); }; @@ -270,11 +267,11 @@ const $MobileProfileLayout = styled.div` 'actions actions' 'settings help' 'migrate migrate' - 'balance balance' + 'staking staking' 'rewards fees' 'history history' 'governance newMarkets' - 'keplr stride'; + 'incentives incentives'; @media ${breakpoints.mobile} { grid-template-areas: @@ -282,13 +279,12 @@ const $MobileProfileLayout = styled.div` 'actions actions' 'settings help' 'migrate migrate' - 'balance balance' + 'staking staking' 'rewards fees' 'history history' 'governance governance' 'newMarkets newMarkets' - 'keplr keplr' - 'stride stride'; + 'incentives incentives'; } `; @@ -446,26 +442,22 @@ const $MigratePanel = styled(MigratePanel)` grid-area: migrate; `; -const $DYDXBalancePanel = styled(DYDXBalancePanel)` - grid-area: balance; +const $StakingPanel = styled(StakingPanel)` + grid-area: staking; `; const $GovernancePanel = styled(GovernancePanel)` grid-area: governance; `; -const $StakingPanel = styled(StakingPanel)` - grid-area: keplr; +const $LaunchIncentivesPanel = styled(LaunchIncentivesPanel)` + grid-area: incentives; `; const $NewMarketsPanel = styled(NewMarketsPanel)` grid-area: newMarkets; `; -const $StrideStakingPanel = styled(StrideStakingPanel)` - grid-area: stride; -`; - const $AssetIcon = styled(AssetIcon)` margin-left: 0.5ch; `; diff --git a/src/pages/token/rewards/GeoblockedPanel.tsx b/src/pages/token/GeoblockedPanel.tsx similarity index 100% rename from src/pages/token/rewards/GeoblockedPanel.tsx rename to src/pages/token/GeoblockedPanel.tsx diff --git a/src/pages/token/Governance.tsx b/src/pages/token/Governance.tsx deleted file mode 100644 index ccd6ea1c4..000000000 --- a/src/pages/token/Governance.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import styled from 'styled-components'; - -import { STRING_KEYS } from '@/constants/localization'; - -import { useStringGetter } from '@/hooks/useStringGetter'; - -import breakpoints from '@/styles/breakpoints'; -import { layoutMixins } from '@/styles/layoutMixins'; - -import { DetachedSection } from '@/components/ContentSection'; -import { ContentSectionHeader } from '@/components/ContentSectionHeader'; - -import { GovernancePanel } from './rewards/GovernancePanel'; -import { NewMarketsPanel } from './rewards/NewMarketsPanel'; - -const Governance = () => { - const stringGetter = useStringGetter(); - - return ( - - <$HeaderSection> - - - - <$ContentWrapper> - <$Row> - - - - - - ); -}; -export default Governance; - -const $HeaderSection = styled.section` - ${layoutMixins.contentSectionDetached} - - @media ${breakpoints.tablet} { - ${layoutMixins.flexColumn} - gap: 1rem; - - margin-bottom: 0.5rem; - } -`; - -const $ContentWrapper = styled.div` - ${layoutMixins.flexColumn} - gap: 1.5rem; - max-width: 80rem; - padding: 0 1rem; -`; - -const $Row = styled.div` - gap: 1rem; - display: grid; - grid-template-columns: repeat(3, 1fr); -`; diff --git a/src/pages/token/rewards/GovernancePanel.tsx b/src/pages/token/GovernancePanel.tsx similarity index 82% rename from src/pages/token/rewards/GovernancePanel.tsx rename to src/pages/token/GovernancePanel.tsx index 713c7de56..6e328e6d8 100644 --- a/src/pages/token/rewards/GovernancePanel.tsx +++ b/src/pages/token/GovernancePanel.tsx @@ -3,7 +3,6 @@ import { useCallback } from 'react'; import { DialogTypes } from '@/constants/dialogs'; import { STRING_KEYS } from '@/constants/localization'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; import { useStringGetter } from '@/hooks/useStringGetter'; import { useURLConfigs } from '@/hooks/useURLConfigs'; @@ -16,7 +15,6 @@ export const GovernancePanel = ({ className }: { className?: string }) => { const stringGetter = useStringGetter(); const dispatch = useAppDispatch(); - const { isStakingEnabled } = useEnvFeatures(); const { governanceLearnMore } = useURLConfigs(); const openKeplrDialog = useCallback( @@ -28,7 +26,7 @@ export const GovernancePanel = ({ className }: { className?: string }) => { { const stringGetter = useStringGetter(); const navigate = useNavigate(); - const { isStakingEnabled } = useEnvFeatures(); const { hasPotentialMarketsData } = usePotentialMarkets(); const { chainTokenDecimals, chainTokenLabel } = useTokenConfigs(); const { newMarketProposal } = useGovernanceVariables(); @@ -40,40 +38,25 @@ export const NewMarketsPanel = ({ className }: { className?: string }) => { if (!hasPotentialMarketsData) return null; const description = stringGetter({ - key: isStakingEnabled - ? STRING_KEYS.ADD_NEW_MARKET_DETAILS - : STRING_KEYS.NEW_MARKET_REWARDS_ENTRY_DESCRIPTION, - params: isStakingEnabled - ? { - AMOUNT: ( - <$Output - useGrouping - type={OutputType.Number} - value={initialDepositAmountBN} - fractionDigits={initialDepositAmountDecimals} - /> - ), - NATIVE_TOKEN_DENOM: chainTokenLabel, - } - : { - REQUIRED_NUM_TOKENS: ( - <$Output - useGrouping - type={OutputType.Number} - value={initialDepositAmountBN} - fractionDigits={initialDepositAmountDecimals} - /> - ), - NATIVE_TOKEN_DENOM: chainTokenLabel, - }, + key: STRING_KEYS.ADD_NEW_MARKET_DETAILS, + params: { + AMOUNT: ( + <$Output + useGrouping + type={OutputType.Number} + value={initialDepositAmountBN} + fractionDigits={initialDepositAmountDecimals} + /> + ), + NATIVE_TOKEN_DENOM: chainTokenLabel, + }, }); return ( { const stringGetter = useStringGetter(); - const { isStakingEnabled } = useEnvFeatures(); const { protocolStaking, tradingRewardsLearnMore, stakingAndClaimingRewardsLearnMore } = useURLConfigs(); @@ -58,38 +56,34 @@ export const RewardsHelpPanel = () => { header: stringGetter({ key: STRING_KEYS.FAQ_HOW_DO_I_CLAIM_MY_REWARDS_QUESTION }), content: stringGetter({ key: STRING_KEYS.FAQ_HOW_DO_I_CLAIM_MY_REWARDS_ANSWER }), }, - ...(isStakingEnabled - ? [ - { - header: stringGetter({ key: STRING_KEYS.FAQ_WHAT_IS_STAKING_QUESTION }), - content: stringGetter({ - key: STRING_KEYS.FAQ_WHAT_IS_STAKING_ANSWER, - params: { - HERE_LINK: hereLink(protocolStaking), - }, - }), - }, - { - header: stringGetter({ - key: STRING_KEYS.FAQ_HOW_DO_I_STAKE_AND_CLAIM_REWARDS_QUESTION, - }), - content: stringGetter({ - key: STRING_KEYS.FAQ_HOW_DO_I_STAKE_AND_CLAIM_REWARDS_ANSWER, - params: { - HERE_LINK: hereLink(stakingAndClaimingRewardsLearnMore), - }, - }), - }, - { - header: stringGetter({ - key: STRING_KEYS.FAQ_WHAT_ARE_THE_RISKS_OF_STAKING_QUESTION, - }), - content: stringGetter({ - key: STRING_KEYS.FAQ_WHAT_ARE_THE_RISKS_OF_STAKING_ANSWER, - }), - }, - ] - : []), + { + header: stringGetter({ key: STRING_KEYS.FAQ_WHAT_IS_STAKING_QUESTION }), + content: stringGetter({ + key: STRING_KEYS.FAQ_WHAT_IS_STAKING_ANSWER, + params: { + HERE_LINK: hereLink(protocolStaking), + }, + }), + }, + { + header: stringGetter({ + key: STRING_KEYS.FAQ_HOW_DO_I_STAKE_AND_CLAIM_REWARDS_QUESTION, + }), + content: stringGetter({ + key: STRING_KEYS.FAQ_HOW_DO_I_STAKE_AND_CLAIM_REWARDS_ANSWER, + params: { + HERE_LINK: hereLink(stakingAndClaimingRewardsLearnMore), + }, + }), + }, + { + header: stringGetter({ + key: STRING_KEYS.FAQ_WHAT_ARE_THE_RISKS_OF_STAKING_QUESTION, + }), + content: stringGetter({ + key: STRING_KEYS.FAQ_WHAT_ARE_THE_RISKS_OF_STAKING_ANSWER, + }), + }, ]} /> diff --git a/src/pages/token/rewards/RewardsNavPanel.tsx b/src/pages/token/RewardsNavPanel.tsx similarity index 80% rename from src/pages/token/rewards/RewardsNavPanel.tsx rename to src/pages/token/RewardsNavPanel.tsx index 7ec46d628..78d392762 100644 --- a/src/pages/token/rewards/RewardsNavPanel.tsx +++ b/src/pages/token/RewardsNavPanel.tsx @@ -1,11 +1,10 @@ import React from 'react'; -import styled, { css } from 'styled-components'; +import styled from 'styled-components'; import { ButtonAction, ButtonSize } from '@/constants/buttons'; import { STRING_KEYS } from '@/constants/localization'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; import { useStringGetter } from '@/hooks/useStringGetter'; import { layoutMixins } from '@/styles/layoutMixins'; @@ -38,13 +37,11 @@ export const RewardsNavPanel = ({ }: ElementProps & StyleProps) => { const stringGetter = useStringGetter(); - const { isStakingEnabled } = useEnvFeatures(); - return ( + <$Title> {title} {titleTag && <$Tag>{titleTag}} } @@ -71,20 +68,11 @@ export const RewardsNavPanel = ({ ); }; -const $Title = styled.h3<{ stakingEnabled: boolean }>` +const $Title = styled.h3` ${layoutMixins.inlineRow} font: var(--font-medium-book); - - ${({ stakingEnabled }) => - stakingEnabled - ? css` - margin-bottom: -1.5rem; - color: var(--color-text-1); - ` - : css` - margin-bottom: -1rem; - color: var(--color-text-2); - `} + margin-bottom: -1.5rem; + color: var(--color-text-1); `; const $Tag = styled(Tag)` diff --git a/src/pages/token/rewards/RewardsPage.tsx b/src/pages/token/RewardsPage.tsx similarity index 68% rename from src/pages/token/rewards/RewardsPage.tsx rename to src/pages/token/RewardsPage.tsx index 0b674032b..d2fcdae1a 100644 --- a/src/pages/token/rewards/RewardsPage.tsx +++ b/src/pages/token/RewardsPage.tsx @@ -14,7 +14,6 @@ import { useAccountBalance } from '@/hooks/useAccountBalance'; import { useBreakpoints } from '@/hooks/useBreakpoints'; import { useComplianceState } from '@/hooks/useComplianceState'; import { useEnvConfig } from '@/hooks/useEnvConfig'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; import { useStringGetter } from '@/hooks/useStringGetter'; import { useTokenConfigs } from '@/hooks/useTokenConfigs'; @@ -33,7 +32,6 @@ import { useAppSelector } from '@/state/appTypes'; import abacusStateManager from '@/lib/abacus'; import { MustBigNumber } from '@/lib/numbers'; -import { DYDXBalancePanel } from './DYDXBalancePanel'; import { GeoblockedPanel } from './GeoblockedPanel'; import { GovernancePanel } from './GovernancePanel'; import { LaunchIncentivesPanel } from './LaunchIncentivesPanel'; @@ -44,7 +42,6 @@ import { RewardsHelpPanel } from './RewardsHelpPanel'; import { StakingPanel } from './StakingPanel'; import { StakingRewardPanel } from './StakingRewardPanel'; import { TradingRewardsChartPanel } from './TradingRewardsChartPanel'; -import { TradingRewardsSummaryPanel } from './TradingRewardsSummaryPanel'; import { UnbondingPanels } from './UnbondingPanels'; const RewardsPage = () => { @@ -57,7 +54,6 @@ const RewardsPage = () => { const { usdcDenom } = useTokenConfigs(); const usdcDecimals = 24; // hardcoded solution; fix in OTE-390 - const { isStakingEnabled } = useEnvFeatures(); const { totalRewards } = useAppSelector(getStakingRewards, shallowEqual) ?? {}; @@ -79,8 +75,8 @@ const RewardsPage = () => { const showMigratePanel = import.meta.env.VITE_V3_TOKEN_ADDRESS && isNotTablet && MustBigNumber(tokenBalance).gt(0); - const showGeoblockedPanel = isStakingEnabled && complianceState !== ComplianceStates.FULL_ACCESS; - const showStakingRewardPanel = totalUsdcRewards > 0 && !showGeoblockedPanel && isStakingEnabled; + const showGeoblockedPanel = complianceState !== ComplianceStates.FULL_ACCESS; + const showStakingRewardPanel = totalUsdcRewards > 0 && !showGeoblockedPanel; const stakingRewardPanel = ( { abacusStateManager.setHistoricalTradingRewardPeriod(HistoricalTradingRewardsPeriod.DAILY); }, [canViewAccount]); - return isTablet ? ( -
- navigate(AppRoute.Profile)} />} - /> - <$DetachedSection> - {showGeoblockedPanel && } - {showStakingRewardPanel && stakingRewardPanel} - {isStakingEnabled ? : } - {isStakingEnabled && } - {isStakingEnabled && } - - {!isStakingEnabled && } - {isStakingEnabled && } - {isStakingEnabled && } - - - {isStakingEnabled && legalDisclaimer} - -
- ) : ( - <$DetachedSection> - {showMigratePanel && } - <$DoubleColumnView> - <$LeftColumn> - {isStakingEnabled && } - - {!isStakingEnabled && } - - - <$RightColumn> - {showGeoblockedPanel && } - {showStakingRewardPanel && stakingRewardPanel} - {isStakingEnabled ? : } - {isStakingEnabled && } - {isStakingEnabled && } - {isStakingEnabled && } - - {isStakingEnabled && legalDisclaimer} - - - + return ( + <$Page> + {isTablet ? ( +
+ navigate(AppRoute.Profile)} />} + /> + <$DetachedSection> + {showGeoblockedPanel && } + {showStakingRewardPanel && stakingRewardPanel} + + + + + + + + + {legalDisclaimer} + +
+ ) : ( + <$DetachedSection> + {showMigratePanel && } + <$DoubleColumnView> + <$LeftColumn> + + + + + <$RightColumn> + {showGeoblockedPanel && } + {showStakingRewardPanel && stakingRewardPanel} + + + + + + {legalDisclaimer} + + + + )} + ; + ); }; export default RewardsPage; +const $Page = styled.div` + ${layoutMixins.contentContainerPage} +`; + const $DetachedSection = styled(DetachedSection)` display: flex; flex-direction: column; diff --git a/src/pages/token/rewards/StakingPanel.tsx b/src/pages/token/StakingPanel.tsx similarity index 100% rename from src/pages/token/rewards/StakingPanel.tsx rename to src/pages/token/StakingPanel.tsx diff --git a/src/pages/token/rewards/StakingRewardPanel.tsx b/src/pages/token/StakingRewardPanel.tsx similarity index 100% rename from src/pages/token/rewards/StakingRewardPanel.tsx rename to src/pages/token/StakingRewardPanel.tsx diff --git a/src/pages/token/Token.tsx b/src/pages/token/Token.tsx deleted file mode 100644 index fc6269ede..000000000 --- a/src/pages/token/Token.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import { Suspense, lazy } from 'react'; - -import { Navigate, Route, Routes } from 'react-router-dom'; -import styled from 'styled-components'; - -import { STRING_KEYS } from '@/constants/localization'; -import { TokenRoute } from '@/constants/routes'; - -import { useBreakpoints } from '@/hooks/useBreakpoints'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; -import { useStringGetter } from '@/hooks/useStringGetter'; - -import { layoutMixins } from '@/styles/layoutMixins'; - -import { Icon, IconName } from '@/components/Icon'; -import { LoadingSpace } from '@/components/Loading/LoadingSpinner'; -import { NavigationMenu } from '@/components/NavigationMenu'; -import { WithSidebar } from '@/components/WithSidebar'; - -const RewardsPage = lazy(() => import('./rewards/RewardsPage')); -const StakingPage = lazy(() => import('./staking/StakingPage')); -const GovernancePage = lazy(() => import('./Governance')); - -const Token = () => { - const stringGetter = useStringGetter(); - - const { isTablet } = useBreakpoints(); - const { isStakingEnabled } = useEnvFeatures(); - - const routesComponent = ( - }> - - } /> - {!isStakingEnabled && } />} - {!isStakingEnabled && } />} - } /> - - - ); - - return ( - - <$NavigationMenu - items={[ - { - group: 'views', - groupLabel: stringGetter({ key: STRING_KEYS.VIEWS }), - items: [ - { - value: TokenRoute.TradingRewards, - slotBefore: ( - <$IconContainer> - - - ), - label: stringGetter({ key: STRING_KEYS.TRADING_REWARDS }), - href: TokenRoute.TradingRewards, - }, - { - value: TokenRoute.StakingRewards, - slotBefore: ( - <$IconContainer> - - - ), - label: stringGetter({ key: STRING_KEYS.STAKING_REWARDS }), - href: TokenRoute.StakingRewards, - tag: stringGetter({ key: STRING_KEYS.NEW }), - }, - { - value: TokenRoute.Governance, - slotBefore: ( - <$IconContainer> - - - ), - label: stringGetter({ key: STRING_KEYS.GOVERNANCE }), - href: TokenRoute.Governance, - }, - ], - }, - ]} - /> - - ) - } - > - {routesComponent} - - ); -}; -export default Token; - -const $SideBar = styled.div` - ${layoutMixins.flexColumn} - justify-content: space-between; - - height: 100%; -`; - -const $NavigationMenu = styled(NavigationMenu)` - padding: 0.5rem; - padding-top: 0; -`; - -const $IconContainer = styled.div` - width: 1.5rem; - height: 1.5rem; - font-size: 0.75rem; - display: flex; - justify-content: center; - align-items: center; - background-color: var(--color-layer-4); - border-radius: 50%; - margin-left: -0.25rem; -`; diff --git a/src/pages/token/rewards/TradingRewardsChartPanel.tsx b/src/pages/token/TradingRewardsChartPanel.tsx similarity index 100% rename from src/pages/token/rewards/TradingRewardsChartPanel.tsx rename to src/pages/token/TradingRewardsChartPanel.tsx diff --git a/src/pages/token/rewards/TradingRewardsSummaryPanel.tsx b/src/pages/token/TradingRewardsSummaryPanel.tsx similarity index 100% rename from src/pages/token/rewards/TradingRewardsSummaryPanel.tsx rename to src/pages/token/TradingRewardsSummaryPanel.tsx diff --git a/src/pages/token/rewards/UnbondingPanels.tsx b/src/pages/token/UnbondingPanels.tsx similarity index 100% rename from src/pages/token/rewards/UnbondingPanels.tsx rename to src/pages/token/UnbondingPanels.tsx diff --git a/src/pages/token/rewards/DYDXBalancePanel.tsx b/src/pages/token/rewards/DYDXBalancePanel.tsx deleted file mode 100644 index 458c12bfd..000000000 --- a/src/pages/token/rewards/DYDXBalancePanel.tsx +++ /dev/null @@ -1,206 +0,0 @@ -import type { ElementType } from 'react'; - -import { shallowEqual } from 'react-redux'; -import styled from 'styled-components'; - -import { ButtonAction, ButtonSize } from '@/constants/buttons'; -import { DialogTypes } from '@/constants/dialogs'; -import { STRING_KEYS } from '@/constants/localization'; -import { WalletType, wallets } from '@/constants/wallets'; - -import { useAccountBalance } from '@/hooks/useAccountBalance'; -import { useAccounts } from '@/hooks/useAccounts'; -import { useStringGetter } from '@/hooks/useStringGetter'; -import { useTokenConfigs } from '@/hooks/useTokenConfigs'; - -import { layoutMixins } from '@/styles/layoutMixins'; - -import { AssetIcon } from '@/components/AssetIcon'; -import { Button } from '@/components/Button'; -import { Details } from '@/components/Details'; -import { Icon, IconName } from '@/components/Icon'; -import { Output, OutputType } from '@/components/Output'; -import { Panel } from '@/components/Panel'; -import { Toolbar } from '@/components/Toolbar'; -import { OnboardingTriggerButton } from '@/views/dialogs/OnboardingTriggerButton'; - -import { calculateCanAccountTrade } from '@/state/accountCalculators'; -import { useAppDispatch, useAppSelector } from '@/state/appTypes'; -import { openDialog } from '@/state/dialogs'; - -export const DYDXBalancePanel = ({ className }: { className?: string }) => { - const dispatch = useAppDispatch(); - const stringGetter = useStringGetter(); - - const { walletType } = useAccounts(); - const canAccountTrade = useAppSelector(calculateCanAccountTrade, shallowEqual); - const { nativeTokenBalance, nativeStakingBalance } = useAccountBalance(); - const { chainTokenLabel } = useTokenConfigs(); - - return ( - - <$Title> - - {chainTokenLabel} - - <$ActionButtons> - {!canAccountTrade ? ( - - ) : ( - - )} - - - } - > - <$Content> - <$WalletAndStakedBalance - layout="grid" - items={[ - { - key: 'wallet', - label: ( - <$Label> -

{stringGetter({ key: STRING_KEYS.WALLET })}

- <$IconContainer> - - - - ), - - value: , - }, - { - key: 'staked', - label: ( - <$Label> -

{stringGetter({ key: STRING_KEYS.STAKED })}

- <$IconContainer> - - - - ), - - value: , - }, - ]} - /> - <$TotalBalance - items={[ - { - key: 'totalBalance', - label: stringGetter({ key: STRING_KEYS.TOTAL_BALANCE }), - value: ( - - ), - }, - ]} - /> - -
- ); -}; -const $Header = styled.div` - ${layoutMixins.spacedRow} - gap: 1rem; - padding: var(--panel-paddingY) var(--panel-paddingX) 0; -`; - -const $Title = styled.h3` - ${layoutMixins.inlineRow} - font: var(--font-medium-book); - color: var(--color-text-2); - - img { - font-size: 1.5rem; - } -`; - -const $ActionButtons = styled(Toolbar)` - ${layoutMixins.inlineRow} - --stickyArea-topHeight: max-content; - gap: 0.5rem; - padding: 0; -`; - -const $Content = styled.div` - ${layoutMixins.flexColumn} - gap: 0.75rem; -`; - -const $IconContainer = styled.div` - ${layoutMixins.stack} - - height: 1.5rem; - width: 1.5rem; - - background-color: var(--color-layer-3); - border-radius: 50%; - - > svg { - place-self: center; - height: 0.75rem; - width: auto; - color: var(--color-text-0); - } -`; - -const $WalletAndStakedBalance = styled(Details)` - --details-item-backgroundColor: var(--color-layer-6); - - grid-template-columns: 1fr 1fr; - gap: 1rem; - - > div { - gap: 1rem; - - padding: 1rem; - - border-radius: 0.75em; - background-color: var(--color-layer-5); - } - - dt { - width: 100%; - } - - output { - color: var(--color-text-2); - font: var(--font-large-book); - } -`; - -const $Label = styled.div` - ${layoutMixins.spacedRow} - - font: var(--font-base-book); - color: var(--color-text-1); -`; - -const $TotalBalance = styled(Details)` - div { - --scrollArea-height: auto; - } - - output { - color: var(--color-text-1); - } -`; diff --git a/src/pages/token/staking/StakingPage.tsx b/src/pages/token/staking/StakingPage.tsx deleted file mode 100644 index 6d58443e8..000000000 --- a/src/pages/token/staking/StakingPage.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import styled from 'styled-components'; - -import { STRING_KEYS } from '@/constants/localization'; - -import { useStringGetter } from '@/hooks/useStringGetter'; - -import breakpoints from '@/styles/breakpoints'; -import { layoutMixins } from '@/styles/layoutMixins'; - -import { DetachedSection } from '@/components/ContentSection'; -import { ContentSectionHeader } from '@/components/ContentSectionHeader'; - -import { DYDXBalancePanel } from '../rewards/DYDXBalancePanel'; -import { StakingPanel } from './StakingPanel'; -import { StrideStakingPanel } from './StrideStakingPanel'; - -const StakingPage = () => { - const stringGetter = useStringGetter(); - return ( - - <$HeaderSection> - - - - <$ContentWrapper> - <$Row> - <$InnerRow> - - - - - - - - ); -}; -export default StakingPage; - -const $HeaderSection = styled.section` - ${layoutMixins.contentSectionDetached} - - @media ${breakpoints.tablet} { - ${layoutMixins.flexColumn} - gap: 1rem; - - margin-bottom: 0.5rem; - } -`; - -const $ContentWrapper = styled.div` - ${layoutMixins.flexColumn} - gap: 1.5rem; - max-width: 80rem; - padding: 0 1rem; -`; - -const $Row = styled.div` - gap: 1rem; - display: grid; - grid-template-columns: 2fr 1fr; -`; - -const $InnerRow = styled.div` - gap: 1rem; - display: grid; - grid-template-columns: 1fr 1fr; - height: fit-content; -`; diff --git a/src/pages/token/staking/StakingPanel.tsx b/src/pages/token/staking/StakingPanel.tsx deleted file mode 100644 index cd1ec3e0a..000000000 --- a/src/pages/token/staking/StakingPanel.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import styled from 'styled-components'; - -import { DialogTypes } from '@/constants/dialogs'; -import { STRING_KEYS } from '@/constants/localization'; - -import { useStringGetter } from '@/hooks/useStringGetter'; -import { useURLConfigs } from '@/hooks/useURLConfigs'; - -import { Link } from '@/components/Link'; -import { Panel } from '@/components/Panel'; - -import { useAppDispatch } from '@/state/appTypes'; -import { openDialog } from '@/state/dialogs'; - -export const StakingPanel = ({ className }: { className?: string }) => { - const stringGetter = useStringGetter(); - const dispatch = useAppDispatch(); - const { stakingLearnMore } = useURLConfigs(); - - return ( - <$Panel - className={className} - slotHeaderContent={ - <$Header> - <$Title>{stringGetter({ key: STRING_KEYS.STAKE_WITH_KEPLR })} - <$Img src="/third-party/keplr.png" alt={stringGetter({ key: STRING_KEYS.KEPLR })} /> - - } - onClick={() => dispatch(openDialog(DialogTypes.ExternalNavKeplr()))} - > - <$Description> - {stringGetter({ key: STRING_KEYS.STAKING_DESCRIPTION })} - <$Link isInline href={stakingLearnMore} onClick={(e) => e.stopPropagation()}> - {stringGetter({ key: STRING_KEYS.LEARN_MORE })} → - - - - ); -}; -const $Panel = styled(Panel)` - align-items: start; - - header { - justify-content: unset; - padding-bottom: 0; - } -`; - -const $Header = styled.div` - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - width: 100%; -`; - -const $Title = styled.h3` - font: var(--font-medium-book); - color: var(--color-text-1); -`; - -const $Img = styled.img` - width: 2rem; - height: 2rem; - margin-left: 0.5rem; -`; - -const $Description = styled.div` - color: var(--color-text-0); -`; - -const $Link = styled(Link)` - margin-left: 0.5ch; -`; diff --git a/src/pages/token/staking/StrideStakingPanel.tsx b/src/pages/token/staking/StrideStakingPanel.tsx deleted file mode 100644 index 0fe66e195..000000000 --- a/src/pages/token/staking/StrideStakingPanel.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import styled from 'styled-components'; - -import { DialogTypes } from '@/constants/dialogs'; -import { STRING_KEYS } from '@/constants/localization'; - -import { useStringGetter } from '@/hooks/useStringGetter'; -import { useTokenConfigs } from '@/hooks/useTokenConfigs'; -import { useURLConfigs } from '@/hooks/useURLConfigs'; - -import { Link } from '@/components/Link'; -import { Panel } from '@/components/Panel'; -import { Tag } from '@/components/Tag'; - -import { useAppDispatch } from '@/state/appTypes'; -import { openDialog } from '@/state/dialogs'; - -export const StrideStakingPanel = ({ className }: { className?: string }) => { - const stringGetter = useStringGetter(); - const dispatch = useAppDispatch(); - const { stakingLearnMore } = useURLConfigs(); - const { chainTokenLabel } = useTokenConfigs(); - - return ( - <$Panel - className={className} - slotHeaderContent={ - <$Header> - <$Title> - {stringGetter({ key: STRING_KEYS.LIQUID_STAKE_W_STRIDE })} - {stringGetter({ key: STRING_KEYS.NEW })} - - <$Img src="/third-party/stride.png" alt="Stride" /> - - } - onClick={() => dispatch(openDialog(DialogTypes.ExternalNavStride()))} - > - <$Description> - {stringGetter({ - key: STRING_KEYS.LIQUID_STAKE_STRIDE_DESCRIPTION, - params: { TOKEN_DENOM: chainTokenLabel }, - })} - <$Link isInline href={stakingLearnMore} onClick={(e) => e.stopPropagation()}> - {stringGetter({ key: STRING_KEYS.LEARN_MORE })} → - - - - ); -}; -const $Panel = styled(Panel)` - align-items: start; - - header { - justify-content: unset; - padding-bottom: 0; - } -`; - -const $Header = styled.div` - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - width: 100%; -`; - -const $Title = styled.h3` - font: var(--font-medium-book); - color: var(--color-text-1); - - display: flex; - align-items: center; - gap: 0.5ch; -`; - -const $Img = styled.img` - width: 2rem; - height: 2rem; - margin-left: 0.5rem; -`; - -const $Description = styled.div` - color: var(--color-text-0); -`; - -const $Link = styled(Link)` - margin-left: 0.5ch; -`; diff --git a/src/views/ExchangeBillboards.tsx b/src/views/ExchangeBillboards.tsx index 39e2930db..06d8b6da0 100644 --- a/src/views/ExchangeBillboards.tsx +++ b/src/views/ExchangeBillboards.tsx @@ -2,9 +2,7 @@ import styled from 'styled-components'; import { ButtonAction, ButtonSize, ButtonType } from '@/constants/buttons'; import { STRING_KEYS } from '@/constants/localization'; -import { TokenRoute } from '@/constants/routes'; -import { useEnvFeatures } from '@/hooks/useEnvFeatures'; import { usePerpetualMarketsStats } from '@/hooks/usePerpetualMarketsStats'; import { useStringGetter } from '@/hooks/useStringGetter'; import { useTokenConfigs } from '@/hooks/useTokenConfigs'; @@ -22,7 +20,6 @@ type ExchangeBillboardsProps = { export const ExchangeBillboards: React.FC = () => { const stringGetter = useStringGetter(); - const { isStakingEnabled } = useEnvFeatures(); const { chainTokenLabel } = useTokenConfigs(); const { @@ -54,9 +51,7 @@ export const ExchangeBillboards: React.FC = () => { value: feesEarned, type: OutputType.Fiat, linkLabelKey: STRING_KEYS.LEARN_MORE_ARROW, - link: isStakingEnabled - ? `${chainTokenLabel}` - : `${chainTokenLabel}/${TokenRoute.StakingRewards}`, + link: `${chainTokenLabel}`, }, ].map(({ key, labelKey, tagKey, value, fractionDigits, type, link, linkLabelKey }) => ( <$BillboardContainer key={key}>