Skip to content

Commit 41d6753

Browse files
committed
fix(MarketTable): chain check
1 parent 87b8136 commit 41d6753

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/MarketTable/MarketTable.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import TableRow from '@/components/TableRow'
77
import Spacer from '@/components/Spacer'
88

99
import Loader from '../Loader'
10+
import { useWeb3React } from '@web3-react/core'
1011

1112
const headers = [
1213
{
@@ -21,6 +22,8 @@ interface MarketProps {
2122
lists: any
2223
}
2324
const MarketTable: React.FC<MarketProps> = ({ lists }) => {
25+
const { chainId } = useWeb3React()
26+
2427
return (
2528
<TableBody>
2629
<StyledTableRow isHead>
@@ -31,6 +34,7 @@ const MarketTable: React.FC<MarketProps> = ({ lists }) => {
3134
<GreyBack />
3235
{lists?.asset ? (
3336
lists.asset.tokens.map((token, index) => {
37+
if (token.chainId !== chainId) return
3438
return (
3539
<Link
3640
href={`/markets/${encodeURIComponent(
@@ -68,6 +72,7 @@ const MarketTable: React.FC<MarketProps> = ({ lists }) => {
6872
)}
6973
{lists.defi ? (
7074
lists.defi.tokens.map((token, index) => {
75+
if (token.chainId !== chainId) return
7176
return (
7277
<Link
7378
href={`/markets/${encodeURIComponent(

0 commit comments

Comments
 (0)