@lifi/widget
Version:
LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.
7 lines (6 loc) • 317 B
JavaScript
import { useMemo } from 'react';
import { useWidgetConfig } from '../providers';
export const useFeaturedTokens = (selectedChainId) => {
const { tokens } = useWidgetConfig();
return useMemo(() => tokens?.featured?.filter((token) => token.chainId === selectedChainId), [selectedChainId, tokens?.featured]);
};