File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/components/MarketTable Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import TableRow from '@/components/TableRow'
7
7
import Spacer from '@/components/Spacer'
8
8
9
9
import Loader from '../Loader'
10
+ import { useWeb3React } from '@web3-react/core'
10
11
11
12
const headers = [
12
13
{
@@ -21,6 +22,8 @@ interface MarketProps {
21
22
lists : any
22
23
}
23
24
const MarketTable : React . FC < MarketProps > = ( { lists } ) => {
25
+ const { chainId } = useWeb3React ( )
26
+
24
27
return (
25
28
< TableBody >
26
29
< StyledTableRow isHead >
@@ -31,6 +34,7 @@ const MarketTable: React.FC<MarketProps> = ({ lists }) => {
31
34
< GreyBack />
32
35
{ lists ?. asset ? (
33
36
lists . asset . tokens . map ( ( token , index ) => {
37
+ if ( token . chainId !== chainId ) return
34
38
return (
35
39
< Link
36
40
href = { `/markets/${ encodeURIComponent (
@@ -68,6 +72,7 @@ const MarketTable: React.FC<MarketProps> = ({ lists }) => {
68
72
) }
69
73
{ lists . defi ? (
70
74
lists . defi . tokens . map ( ( token , index ) => {
75
+ if ( token . chainId !== chainId ) return
71
76
return (
72
77
< Link
73
78
href = { `/markets/${ encodeURIComponent (
You can’t perform that action at this time.
0 commit comments