Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkSelector: get list of networks from route utils #412

Merged
merged 1 commit into from
May 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/pages/HomePage/Graph/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { styled } from '@mui/material/styles'
import { COLORS } from '../../../../../styles/theme/colors'
import { Network } from '../../../../../types/network'
import Collapse from '@mui/material/Collapse'
import { RouteUtils } from '../../../../utils/route-utils'

const StyledNetworkSelector = styled(Box)(() => ({
position: 'absolute',
Expand Down Expand Up @@ -69,7 +70,7 @@ export const NetworkSelector: FC<NetworkSelectorProps> = ({ network, setNetwork
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
const [open, setOpen] = useState(false)
const options: Network[] = ['mainnet', 'testnet']
const options: Network[] = RouteUtils.getEnabledNetworks()
const labels = getLabels(t)

return (
Expand Down