Skip to content

Commit

Permalink
fix chain select
Browse files Browse the repository at this point in the history
  • Loading branch information
on47sky committed Sep 4, 2024
1 parent 847b484 commit 4ecd307
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { userAgent } from 'next/server'
import { cookieToInitialState } from 'wagmi'
import { type ChainId } from '@azuro-org/toolkit'
import { config } from 'wallet'
import { polygon } from 'viem/chains'
import { polygonAmoy } from 'viem/chains'
import { constants } from 'helpers'

import Providers from 'compositions/Providers/Providers'
Expand Down Expand Up @@ -43,7 +43,7 @@ export default function RootLayout({
const initialLiveState = JSON.parse(cookieStore.get('live')?.value || 'false')

const initialChainId = _initialChainId &&
(config.chains.find(chain => chain.id === +_initialChainId)?.id as ChainId) || polygon.id
(config.chains.find(chain => chain.id === +_initialChainId)?.id as ChainId) || polygonAmoy.id

return (
<html lang="en">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import React from 'react'
import { useBetTokenBalance, useBetsSummary, useChain, useNativeBalance } from '@azuro-org/sdk'
import { chainsData, type ChainId } from '@azuro-org/toolkit'
import { type ChainId } from '@azuro-org/toolkit'
import { Listbox } from '@headlessui/react'
import { Message } from '@locmod/intl'
import cx from 'classnames'
import { useAccount } from 'wagmi'
import { config } from 'wallet'
import { constants } from 'helpers'

import { formatToFixed } from 'helpers/formatters'
Expand Down Expand Up @@ -64,7 +65,7 @@ const ChainSelect: React.FC = () => {
</Listbox.Button>
<Listbox.Options className="w-full space-y-[2px]">
{
Object.values(chainsData).map(({ chain }) => {
config.chains.map((chain) => {
const isActive = appChain.id === chain.id

return (
Expand Down

0 comments on commit 4ecd307

Please sign in to comment.