@@ -5,16 +5,19 @@ import { ButtonGroup } from 'components';
55import { useChain } from 'hooks/useChain' ;
66import { type Tab , useTabs } from 'hooks/useTabs' ;
77import { useTranslation } from 'libs/translations' ;
8- import { useAccountAddress } from 'libs/wallet' ;
8+ import { useAccountAddress , useChainId } from 'libs/wallet' ;
99import type { Asset } from 'types' ;
1010import { getCombinedDistributionApys } from 'utilities' ;
11+ import { isSunsetChain } from 'utilities/isSunsetChain' ;
1112import { GlassCard } from './GlassCard' ;
1213import { TabContent } from './TabContent' ;
1314
1415export const HeroTabs : React . FC = ( ) => {
1516 const { t } = useTranslation ( ) ;
1617
1718 const { corePoolComptrollerContractAddress } = useChain ( ) ;
19+ const { chainId } = useChainId ( ) ;
20+ const ignoreDisabledActions = isSunsetChain ( chainId ) ;
1821
1922 // TODO: update to fetch top markets across chains
2023 const { accountAddress } = useAccountAddress ( ) ;
@@ -35,7 +38,7 @@ export const HeroTabs: React.FC = () => {
3538 const assetApys = getCombinedDistributionApys ( { asset } ) ;
3639
3740 if (
38- ! asset . disabledTokenActions . includes ( 'supply' ) &&
41+ ( ignoreDisabledActions || ! asset . disabledTokenActions . includes ( 'supply' ) ) &&
3942 assetApys . totalSupplyApyPercentage . isGreaterThan (
4043 topSupplyAssetApys ?. totalSupplyApyPercentage || Number . NEGATIVE_INFINITY ,
4144 )
@@ -46,7 +49,7 @@ export const HeroTabs: React.FC = () => {
4649
4750 if (
4851 asset . isBorrowable &&
49- ! asset . disabledTokenActions . includes ( 'borrow' ) &&
52+ ( ignoreDisabledActions || ! asset . disabledTokenActions . includes ( 'borrow' ) ) &&
5053 assetApys . totalBorrowApyPercentage . isLessThan (
5154 topBorrowAssetApys ?. totalBorrowApyPercentage || Number . POSITIVE_INFINITY ,
5255 )
0 commit comments