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

Rainbow Wallet + wagmi Integration #1207

Draft
wants to merge 102 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
527e728
Bump typescript, move to devDeps
hammeiam Jul 4, 2022
423be1c
fix types
hammeiam Jul 4, 2022
33ba545
removed pools_map
arthur-zhuk Jul 6, 2022
5491cbc
cr addressed
arthur-zhuk Jul 6, 2022
fa4b690
refactored Swap
arthur-zhuk Jul 13, 2022
2a7f70b
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 13, 2022
0ad250d
wip
arthur-zhuk Jul 13, 2022
4e5f0a7
lost in undoing logic
arthur-zhuk Jul 13, 2022
b8d59ad
Merge branch 'registryMigrationSwapRefactor' of https://github.com/sa…
arthur-zhuk Jul 13, 2022
6305e90
removed from test file
arthur-zhuk Jul 13, 2022
2d93910
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 13, 2022
748c186
synth related token_maps changes
arthur-zhuk Jul 14, 2022
cb0c16c
fix test
arthur-zhuk Jul 14, 2022
c768e36
test adjst
arthur-zhuk Jul 14, 2022
bf15909
misc pools_map removed
arthur-zhuk Jul 14, 2022
2e0f757
ts fix
arthur-zhuk Jul 14, 2022
0b12b4e
wip
arthur-zhuk Jul 14, 2022
480c078
fixed multiscan link and potential coingecko id
arthur-zhuk Jul 20, 2022
0d9a07b
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 20, 2022
c2935a0
crs addressed
arthur-zhuk Jul 22, 2022
39461f4
Merge branch 'registryMigrationTokensMapRefactor' of https://github.c…
arthur-zhuk Jul 22, 2022
33f8f63
tokenMaps rename on useContract
arthur-zhuk Jul 22, 2022
c750629
remove logs
arthur-zhuk Jul 23, 2022
7b96e73
bring in rq success
arthur-zhuk Jul 23, 2022
6422b24
eslint err fix, gave type to ABI
arthur-zhuk Jul 23, 2022
a227d84
simple start groundwork
arthur-zhuk Jul 23, 2022
a4d0d52
ignore react-router-dom type issues + BN type added
arthur-zhuk Jul 23, 2022
a4e8d16
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 23, 2022
920f44f
better svg fix
arthur-zhuk Jul 23, 2022
c1c96bb
upgrade eslint
arthur-zhuk Jul 23, 2022
a409c18
Merge branch 'david/update-typescript' of https://github.com/saddle-f…
arthur-zhuk Jul 24, 2022
c5062b9
lint addressed
arthur-zhuk Jul 24, 2022
fb42880
added void instead of disable rule
arthur-zhuk Jul 24, 2022
3732cec
removed dead rule ignore, added more voids
arthur-zhuk Jul 24, 2022
88eabcb
Merge branch 'master' into registryMigrationTokensMapRefactor
arthur-zhuk Jul 26, 2022
17d68ce
rainbow wallet wip
arthur-zhuk Jul 26, 2022
4cebbd2
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 26, 2022
b99cf16
Merge branch 'registryMigrationTokensMapRefactor' of https://github.c…
arthur-zhuk Jul 26, 2022
37adb2d
swap flow working with these changes
arthur-zhuk Jul 27, 2022
ffcf7c5
modal early returns
arthur-zhuk Jul 27, 2022
017fa19
early returns, swap working
arthur-zhuk Jul 27, 2022
08a2f68
swappage early return swap working
arthur-zhuk Jul 27, 2022
2b0c997
removed allCOntracts hook and tested swap
arthur-zhuk Jul 27, 2022
b8d93ae
remove address check
arthur-zhuk Jul 27, 2022
b1cb42b
useTokenMaps early return and swap tested
arthur-zhuk Jul 27, 2022
57ac4b5
swap cr addressed, tested swap flow
arthur-zhuk Jul 27, 2022
5aa59fb
remove defaults and tested swap
arthur-zhuk Jul 28, 2022
f897ebe
confirm swap works after undefined type removal
arthur-zhuk Jul 28, 2022
ed4f147
reverted work to get tokenPrices w\ new method
arthur-zhuk Jul 28, 2022
2070f16
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 28, 2022
117503f
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 28, 2022
28e0f46
Merge branch 'registryMigrationTokensMapRefactor' of https://github.c…
arthur-zhuk Jul 28, 2022
6458ac8
removed unused
arthur-zhuk Jul 28, 2022
6092a71
Merge branch 'registryMigrationTokensMapRefactor' of https://github.c…
arthur-zhuk Jul 28, 2022
d3ac802
more early returns cr addressed
arthur-zhuk Jul 28, 2022
18fe5fc
uncomment poolname
arthur-zhuk Jul 28, 2022
25f176a
Merge branch 'registryMigrationTokensMapRefactor' of https://github.c…
arthur-zhuk Jul 28, 2022
33a35dc
Merge branch 'registryMigrationSwapRefactor' of https://github.com/sa…
arthur-zhuk Jul 28, 2022
6f034d5
brought back pool + swap component
arthur-zhuk Jul 28, 2022
7cceb64
positioned basicPoolsPRovider higher up in context
arthur-zhuk Jul 28, 2022
04d51f3
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 28, 2022
ea46276
Merge branch 'miscPoolMapRemoval' of https://github.com/saddle-financ…
arthur-zhuk Jul 28, 2022
83313d2
Merge branch 'rqAttempt2' of https://github.com/saddle-finance/saddle…
arthur-zhuk Jul 28, 2022
92074b1
moved overrides from package to eslint config
arthur-zhuk Jul 28, 2022
7ff6cb7
BasicPool query added and used on App lvl
arthur-zhuk Jul 28, 2022
500a899
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 29, 2022
3150575
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 29, 2022
a4a25d4
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 29, 2022
1ec3c30
Small inital example moving off provider
arthur-zhuk Jul 29, 2022
e33a964
moved some logic out of query
arthur-zhuk Jul 30, 2022
8e19823
remove loading for now
arthur-zhuk Jul 30, 2022
e47e334
Merge branch 'rqAttempt2' of https://github.com/saddle-finance/saddle…
arthur-zhuk Jul 30, 2022
7c3fbb2
removing query from basicpools for now to keep pr scope smaller
arthur-zhuk Jul 30, 2022
fa633fc
moved queryClient outside of App comp
arthur-zhuk Jul 30, 2022
236b66b
Merge branch 'rqAttempt2' of https://github.com/saddle-finance/saddle…
arthur-zhuk Jul 30, 2022
9f3e4dc
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Jul 30, 2022
3a7b813
Merge branch 'rqAttempt2' of https://github.com/saddle-finance/saddle…
arthur-zhuk Jul 30, 2022
601ecd9
have to throw when within useQuery
arthur-zhuk Jul 30, 2022
d56d967
Merge branch 'rqAttempt2' of https://github.com/saddle-finance/saddle…
arthur-zhuk Jul 30, 2022
2d479d6
Merge branch eslintUpgradeAttempt of https://github.com/saddle-financ…
arthur-zhuk Jul 30, 2022
7b4a084
rainbow wallet
arthur-zhuk Jul 30, 2022
83e9e1f
alchemy attempt
arthur-zhuk Jul 30, 2022
6ff7ed8
trying something
arthur-zhuk Jul 30, 2022
2f8e419
turn off suspense test
arthur-zhuk Jul 30, 2022
70b5cdc
revert tests
arthur-zhuk Jul 30, 2022
749db2c
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Aug 2, 2022
b9bc53c
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Aug 2, 2022
146c49b
themes and chains added
arthur-zhuk Aug 2, 2022
1448211
web3-react to wagmi refactor wip
arthur-zhuk Aug 2, 2022
6b29113
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Aug 3, 2022
5d62114
remove log
arthur-zhuk Aug 4, 2022
21a15a4
Merge branch 'wagmiHookMulticallRefactor' into wagmiIntegration
arthur-zhuk Aug 12, 2022
f2c2dba
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Aug 12, 2022
f4506bf
working wallet and basicPools on wagmi
arthur-zhuk Aug 15, 2022
ca6760d
bring back query client
arthur-zhuk Aug 15, 2022
1630336
cleaning up
arthur-zhuk Aug 15, 2022
9d36f5d
removed wagmi passing, using hooks
arthur-zhuk Aug 15, 2022
22fed2f
chaining
arthur-zhuk Aug 15, 2022
9fee463
TODO to delete migrationOld
arthur-zhuk Aug 15, 2022
59e7063
tally working, tokens from context
arthur-zhuk Aug 16, 2022
79c4820
UD wallet to other menu
arthur-zhuk Aug 16, 2022
9095024
Merge branch 'master' of https://github.com/saddle-finance/saddle-fro…
arthur-zhuk Aug 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
779 changes: 754 additions & 25 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@mui/lab": "^5.0.0-alpha.76",
"@mui/material": "^5.4.0",
"@mui/x-date-pickers": "^5.0.0-alpha.2",
"@rainbow-me/rainbowkit": "^0.4.6",
"@reduxjs/toolkit": "^1.4.0",
"@sentry/react": "^6.16.1",
"@sentry/tracing": "^6.16.1",
Expand All @@ -36,13 +37,14 @@
"copy-to-clipboard": "^3.3.1",
"date-fns": "^2.29.1",
"ethcall": "^4.6.3",
"ethers": "^5.5.3",
"ethers": "^5.6.9",
"framer-motion": "^4.0.3",
"history": "^5.0.0",
"i18next": "^19.8.3",
"i18next-browser-languagedetector": "^6.0.1",
"i18next-fetch-backend": "^3.0.0",
"lodash": "^4.17.20",
"lodash.merge": "^4.6.2",
"react": "^18.2.0",
"react-device-detect": "^2.2.2",
"react-dom": "^18.2.0",
Expand All @@ -54,6 +56,7 @@
"react-use-intercom": "^1.5.0",
"redux": "^4.1.0",
"redux-localstorage-simple": "^2.4.0",
"wagmi": "^0.6.3",
"web-vitals": "^2.1.4"
},
"devDependencies": {
Expand All @@ -72,6 +75,7 @@
"@testing-library/user-event": "^13.5.0",
"@typechain/ethers-v5": "^6.0.5",
"@types/async-retry": "^1.4.2",
"@types/lodash.merge": "^4.6.7",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.30.4",
"@typescript-eslint/parser": "^5.30.4",
Expand Down
23 changes: 15 additions & 8 deletions src/components/AccountDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ import {
Stack,
Typography,
} from "@mui/material"
import { ChainId, SUPPORTED_WALLETS } from "../constants"
import React, { ReactElement, useContext } from "react"
import { commify, formatBNToString } from "../utils"
import { useAccount, useNetwork } from "wagmi"

import ChangeIcon from "@mui/icons-material/ImportExport"
import Copy from "./Copy"
import Identicon from "./Identicon"
import LaunchIcon from "@mui/icons-material/Launch"
import { NETWORK_NATIVE_TOKENS } from "../constants/networks"
import { SUPPORTED_WALLETS } from "../constants"
import Transactions from "./Transactions"
import { UserStateContext } from "../providers/UserStateProvider"
import { Zero } from "@ethersproject/constants"
import { find } from "lodash"
import { getMultichainScanLink } from "../utils/getEtherscanLink"
import { shortenAddress } from "../utils/shortenAddress"
import { useActiveWeb3React } from "../hooks"
// import { useActiveWeb3React } from "../hooks"
import { useTheme } from "@mui/material/styles"
import { useTranslation } from "react-i18next"
import { useUDName } from "../hooks/useUDName"
Expand All @@ -32,10 +33,16 @@ interface Props {

export default function AccountDetail({ openOptions }: Props): ReactElement {
const { t } = useTranslation()
const { account, connector, chainId } = useActiveWeb3React()
// const { account, connector, chainId } = useActiveWeb3React()
const { chain } = useNetwork()
const { address, connector } = useAccount()
// onConnect({ address, connector, isReconnected }) {
// console.log("Connected", { address, connector, isReconnected })
// },
// })
const userState = useContext(UserStateContext)
const udName = useUDName()
const nativeToken = NETWORK_NATIVE_TOKENS[chainId ?? 1]
const nativeToken = NETWORK_NATIVE_TOKENS[(chain?.id as ChainId) ?? 1]
const ethBalanceFormatted = commify(
formatBNToString(userState?.tokenBalances?.[nativeToken] || Zero, 18, 6),
)
Expand Down Expand Up @@ -73,11 +80,11 @@ export default function AccountDetail({ openOptions }: Props): ReactElement {
<Stack direction="row" spacing={1}>
<Identicon />
<Typography variant="subtitle1">
{udName || (account && shortenAddress(account))}
{udName || (address && shortenAddress(address))}
</Typography>
{chainId && account && (
{chain?.id && address && (
<Link
href={getMultichainScanLink(chainId, account, "address")}
href={getMultichainScanLink(chain.id, address, "address")}
target="_blank"
rel="noreferrer"
>
Expand All @@ -91,7 +98,7 @@ export default function AccountDetail({ openOptions }: Props): ReactElement {
</Typography>
</Box>
<Box display="flex" alignItems="center">
{account && <Copy toCopy={account} />}
{address && <Copy toCopy={address} />}
</Box>
<Box display="flex" alignItems="center">
<Button
Expand Down
8 changes: 5 additions & 3 deletions src/components/PoolOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import TokenIcon from "./TokenIcon"
import { Zero } from "@ethersproject/constants"
import { areGaugesActive } from "../utils/gauges"
import logo from "../assets/icons/logo.svg"
import { useActiveWeb3React } from "../hooks"
// import { useActiveWeb3React } from "../hooks"
import { useHistory } from "react-router-dom"
import { useNetwork } from "wagmi"
import { useTranslation } from "react-i18next"

interface Props {
Expand All @@ -38,10 +39,11 @@ export default function PoolOverview({
}: Props): ReactElement | null {
const { t } = useTranslation()
const theme = useTheme()
const { chainId } = useActiveWeb3React()
// const { chainId } = useActiveWeb3React()
const { chain } = useNetwork()
const [poolData, userShareData] = usePoolData(poolName)
const shouldMigrate = !!onClickMigrate
const gaugesAreActive = areGaugesActive(chainId)
const gaugesAreActive = areGaugesActive(chain?.id ?? 1)
const formattedData = {
name: poolData.name,
reserve: poolData.reserve
Expand Down
44 changes: 40 additions & 4 deletions src/components/SiteSettingsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Box, Divider, styled, useTheme } from "@mui/material"
import { ChainId, IS_L2_SUPPORTED, SUPPORTED_WALLETS } from "../constants"
import {
Box,
Collapse,
Divider,
ListItemButton,
ListItemIcon,
ListItemText,
Menu,
MenuItem as MuiMenuItem,
styled,
} from "@mui/material"
import { ChainId, IS_L2_SUPPORTED, IS_SDL_LIVE, SDL_TOKEN } from "../constants"
import {
DEV_SUPPORTED_NETWORKS,
SUPPORTED_NETWORKS,
Expand All @@ -20,7 +18,9 @@ import {
LightMode,
NightlightRound,
} from "@mui/icons-material"
import { IS_SDL_LIVE, SDL_TOKEN } from "../constants"
import React, { ReactElement, useState } from "react"
import { UnsupportedChainIdError, useWeb3React } from "@web3-react/core"

import CheckIcon from "@mui/icons-material/Check"
import { IS_DEVELOPMENT } from "../utils/environment"
Expand All @@ -47,6 +47,9 @@ export default function SiteSettingsMenu({
direction = "right",
}: SiteSettingsMenuProps): ReactElement {
const open = Boolean(anchorEl)
const { activate } = useWeb3React()
const theme = useTheme()
const [isWalletsVisibile, setIsWalletsVisible] = useState(false)
return (
<Menu
open={open}
Expand All @@ -69,6 +72,39 @@ export default function SiteSettingsMenu({
<LanguageSection key="language" />
<Divider variant="middle" />
<ThemeSection key="theme" />
<MenuItem
onClick={() => setIsWalletsVisible((state) => !state)}
data-testid="test"
>
Wallets
{isWalletsVisibile ? <ExpandLess /> : <ExpandMore />}
</MenuItem>
<Collapse in={isWalletsVisibile} data-testid="test">
<ListItemButton
color="inherit"
sx={{
justifyContent: "space-between",
padding: 2,
borderColor: theme.palette.grey[300],
}}
onClick={(): void => {
activate(
SUPPORTED_WALLETS.UNSTOPPABLE_DOMAINS.connector,
undefined,
true,
).catch((error) => {
if (error instanceof UnsupportedChainIdError) {
void activate(SUPPORTED_WALLETS.UNSTOPPABLE_DOMAINS.connector) // a little janky...can't use setError because the connector isn't set
} else {
// TODO: handle error
}
})
close?.()
}}
>
<span>{SUPPORTED_WALLETS.UNSTOPPABLE_DOMAINS.name}</span>
</ListItemButton>
</Collapse>
{IS_SDL_LIVE && <AddTokenSection key="token" />}
</Box>
</Menu>
Expand Down
8 changes: 5 additions & 3 deletions src/components/SwapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import { commify } from "../utils"
import { formatUnits } from "@ethersproject/units"
import { isHighPriceImpact } from "../utils/priceImpact"
import { logEvent } from "../utils/googleAnalytics"
import { useActiveWeb3React } from "../hooks"
import { useAccount } from "wagmi"
// import { useActiveWeb3React } from "../hooks"
import { useSelector } from "react-redux"
import { useTranslation } from "react-i18next"

Expand Down Expand Up @@ -62,7 +63,8 @@ interface Props {

const SwapPage = (props: Props): ReactElement => {
const { t } = useTranslation()
const { account } = useActiveWeb3React()
const { address } = useAccount()
// const { account } = useActiveWeb3React()
const {
tokenOptions,
exchangeRateInfo,
Expand Down Expand Up @@ -219,7 +221,7 @@ const SwapPage = (props: Props): ReactElement => {
)}
</Box>
</Paper>
{account && isHighPriceImpact(exchangeRateInfo.priceImpact) ? (
{address && isHighPriceImpact(exchangeRateInfo.priceImpact) ? (
<Alert variant="filled" severity="error" sx={{ mt: 2 }}>
{t("highPriceImpact", {
rate: formattedPriceImpact,
Expand Down
114 changes: 57 additions & 57 deletions src/components/TopMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ import { NavLink, NavLinkProps, useLocation } from "react-router-dom"
import React, { ReactElement, useContext, useState } from "react"

import { AppState } from "../state"
import NetworkDisplay from "./NetworkDisplay"
import { ConnectButton } from "@rainbow-me/rainbowkit"
// import NetworkDisplay from "./NetworkDisplay"
import { RewardsBalancesContext } from "../providers/RewardsBalancesProvider"
import { ReactComponent as SaddleLogo } from "../assets/icons/logo.svg"
import SiteSettingsMenu from "./SiteSettingsMenu"
import TokenClaimDialog from "./TokenClaimDialog"
import Web3Status from "./Web3Status"
import { areGaugesActive } from "../utils/gauges"
import { formatBNToShortString } from "../utils"
import { useActiveWeb3React } from "../hooks"
import { useNetwork } from "wagmi"
// import { useActiveWeb3React } from "../hooks"
import { useSelector } from "react-redux"
import { useTranslation } from "react-i18next"

Expand Down Expand Up @@ -67,60 +69,57 @@ function TopMenu(): ReactElement {
}
}
return (
<AppBar position="static" elevation={0}>
<Toolbar data-testid="topMenuContainer" sx={{ xs: 0, lg: 7 }}>
<Box display="flex" width="100%" alignItems="center">
<Box flex={1}>
<NavLink to="/">
<SaddleLogo height={isUnderLaptopSize ? "40px" : "100"} />
</NavLink>
</Box>

<Stack
display={isUnderLaptopSize ? "none" : "flex"}
bottom={{ xs: theme.spacing(4) }}
right="50%"
flex={1}
direction="row"
spacing={4}
justifyContent="center"
padding={theme.spacing(1, 3)}
>
<MenuList />
</Stack>
<Stack
direction="row"
spacing={1}
flex={1}
justifyContent="flex-end"
alignItems="center"
<AppBar position="static">
<Toolbar data-testid="topMenuContainer">
<Stack paddingRight={2}>
<NavLink to="/">
<SaddleLogo height={isUnderLaptopSize ? "40px" : "100"} />
</NavLink>
</Stack>

<Stack
flex={1}
justifyContent="flex-start"
direction="row"
spacing={4}
// padding={theme.spacing(1, 3)}
>
<MenuList />
</Stack>
<Stack
direction="row"
spacing={1}
flex={2}
justifyContent="flex-end"
alignItems="center"
paddingRight={2}
>
<SDLPrice sdlPrice={sdlPrice} />
<RewardsButton setCurrentModal={setCurrentModal} />
</Stack>
{/* <Box display={isUnderLaptopSize ? "none" : "block"}> */}
<Stack spacing={1} direction="row">
<ConnectButton />
{/* <Web3Status /> */}
{/* </Box> */}
{/* <NetworkDisplay onClick={handleSettingMenu} /> */}
<IconButton
onClick={handleMoreMenu}
data-testid="settingsMenuBtn"
sx={{
minWidth: 0,
padding: 0.5,
backgroundColor: theme.palette.background.default,
borderRadius: theme.spacing(1),
}}
>
<SDLPrice sdlPrice={sdlPrice} />
<RewardsButton setCurrentModal={setCurrentModal} />
<Box display={isUnderLaptopSize ? "none" : "block"}>
<Web3Status />
</Box>
<NetworkDisplay onClick={handleSettingMenu} />
<IconButton
onClick={handleMoreMenu}
data-testid="settingsMenuBtn"
sx={{
minWidth: 0,
padding: 0.5,
backgroundColor: theme.palette.background.default,
borderRadius: theme.spacing(1),
}}
>
<MoreVert
htmlColor={theme.palette.text.primary}
sx={{ display: isUnderLaptopSize ? "none" : "block" }}
/>
<MenuIcon
sx={{ display: !isUnderLaptopSize ? "none" : "block" }}
/>
</IconButton>
</Stack>
</Box>
<MoreVert
htmlColor={theme.palette.text.primary}
sx={{ display: isUnderLaptopSize ? "none" : "block" }}
/>
<MenuIcon sx={{ display: !isUnderLaptopSize ? "none" : "block" }} />
</IconButton>
</Stack>

<SiteSettingsMenu
key="buttonSettings"
Expand Down Expand Up @@ -176,8 +175,9 @@ function RewardsButton({

function MenuList() {
const { t } = useTranslation()
const { chainId } = useActiveWeb3React()
const gaugesAreActive = areGaugesActive(chainId)
// const { chainId } = useActiveWeb3React()
const { chain } = useNetwork()
const gaugesAreActive = areGaugesActive(chain?.id)
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { pathname } = useLocation()
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
Expand Down
Loading