diff --git a/apps/common/contexts/useYearn.tsx b/apps/common/contexts/useYearn.tsx index e9bfaca36..885efb4fd 100755 --- a/apps/common/contexts/useYearn.tsx +++ b/apps/common/contexts/useYearn.tsx @@ -68,6 +68,7 @@ const YearnContext = createContext({ export const YearnContextApp = memo(function YearnContextApp({children}: { children: ReactElement }): ReactElement { const {safeChainID} = useChainID(); const {yDaemonBaseUri} = useYDaemonBaseURI({chainID: safeChainID}); + const {yDaemonBaseUri: yDaemonBaseUriWithoutChain} = useYDaemonBaseURI(); const result = useYDaemonStatus({chainID: safeChainID}); const {address, currentPartner} = useWeb3(); const [zapSlippage, set_zapSlippage] = useLocalStorage('yearn.fi/zap-slippage', DEFAULT_SLIPPAGE); @@ -91,14 +92,14 @@ export const YearnContextApp = memo(function YearnContextApp({children}: { child }); const {data: vaults, isLoading: isLoadingVaultList, mutate: mutateVaultList} = useFetch({ - endpoint: `${yDaemonBaseUri}/vaults/all?${new URLSearchParams({ + endpoint: `${yDaemonBaseUriWithoutChain}/vaults/all?${new URLSearchParams({ hideAlways: 'true', orderBy: 'apy.net_apy', orderDirection: 'desc', strategiesDetails: 'withDetails', strategiesRisk: 'withRisk', strategiesCondition: 'inQueue' - })}`, + })}&chainIDs=${[1, 10].join(',')}`, schema: yDaemonVaultsSchema }); diff --git a/apps/vaults/components/list/VaultsListRow.tsx b/apps/vaults/components/list/VaultsListRow.tsx index 067eba5fa..34db21a16 100755 --- a/apps/vaults/components/list/VaultsListRow.tsx +++ b/apps/vaults/components/list/VaultsListRow.tsx @@ -3,7 +3,11 @@ import Link from 'next/link'; import {useStakingRewards} from '@vaults/contexts/useStakingRewards'; import {Renderable} from '@yearn-finance/web-lib/components/Renderable'; import {useChainID} from '@yearn-finance/web-lib/hooks/useChainID'; +import {IconArbitrumChain} from '@yearn-finance/web-lib/icons/chains/IconArbitrumChain'; +import {IconBaseChain} from '@yearn-finance/web-lib/icons/chains/IconBaseChain'; import {IconEtherumChain} from '@yearn-finance/web-lib/icons/chains/IconEtherumChain'; +import {IconFantomChain} from '@yearn-finance/web-lib/icons/chains/IconFantomChain'; +import {IconOptimismChain} from '@yearn-finance/web-lib/icons/chains/IconOptimismChain'; import {toAddress} from '@yearn-finance/web-lib/utils/address'; import {ETH_TOKEN_ADDRESS, WETH_TOKEN_ADDRESS, WFTM_TOKEN_ADDRESS} from '@yearn-finance/web-lib/utils/constants'; import {toBigInt} from '@yearn-finance/web-lib/utils/format.bigNumber'; @@ -17,6 +21,14 @@ import {getVaultName} from '@common/utils'; import type {ReactElement} from 'react'; import type {TYDaemonVault} from '@common/schemas/yDaemonVaultsSchemas'; +export const ChainIconMap = new Map([ + [1, ], + [10, ], + [250, ], + [8453, ], + [42161, ] +]); + export function VaultAPR({currentVault}: {currentVault: TYDaemonVault}): ReactElement { const isEthMainnet = currentVault.chainID === 1; @@ -153,8 +165,7 @@ export function VaultsListRow({currentVault}: {currentVault: TYDaemonVault}): Re
- {/* {currentVault.chainID} */} - + {ChainIconMap.get(currentVault.chainID) ?? }