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

feat(arbitrum): add arbitrum_one #4407

Merged
merged 51 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3e236b5
feat: bump cow-sdk to arbitrum supported version
alfetopito May 3, 2024
8c5ddf7
feat: bump eth-flow contract
alfetopito May 3, 2024
34eca5d
feat: bump cow-sdk to ARBITRUM_ONE chainid
alfetopito May 3, 2024
6c06da9
feat: initial round adding ARBITRUM_ONE
alfetopito May 3, 2024
43e7f0e
chore: trying a different default rpc provider
alfetopito May 14, 2024
4624a80
feat: setup arbitrum for explorer
alfetopito May 14, 2024
d0d4fc7
fix: do not fail explorer when PROD api fails
alfetopito May 14, 2024
748ef91
feat: bump permit-utils to 0.3.0-RC.0
alfetopito May 14, 2024
ead211f
chore: misc minor fixes
alfetopito May 14, 2024
a5846d3
chore: change permitinfo temporarily to pending token-lists PR
alfetopito May 15, 2024
d2ac1bb
feat: use coingecko's token list on explorer for arb1
alfetopito May 15, 2024
c819c91
feat: use coingeckos arb1 token list as default on cowswap
alfetopito May 15, 2024
cd1cd49
fix: allow loading lists that have tokens with bad addresses
alfetopito May 15, 2024
f1060ac
chore: fix linter error
alfetopito May 15, 2024
8d055fc
chore: remove COW from arbitrum one favourite tokens list
alfetopito May 15, 2024
8d81bb7
Revert "chore: change permitinfo temporarily to pending token-lists PR"
alfetopito May 15, 2024
89866ce
chore: use nodereal for arb1 explorer
alfetopito May 16, 2024
231109a
chore: use infura by default for arb1
alfetopito May 16, 2024
43bc7ac
fix: use correct chain id for arb1 default token list
alfetopito May 16, 2024
ce3f151
fix: add defillama platform for arb1
alfetopito May 16, 2024
c360258
chore: temporary debug message to check rpc urls
alfetopito May 16, 2024
145385c
fix: ethflow
alfetopito May 17, 2024
78ef15b
chore: remove leading slash from arb1 rpc endpoint
alfetopito May 17, 2024
9632f31
fix: use arb1 USDT favourite tokens
alfetopito May 17, 2024
f3b678f
feat: use CHAIN_INFO on widget configurator
alfetopito May 17, 2024
9c288ac
test: fix validatePartnerFee unit test
alfetopito May 17, 2024
5811cd1
chore: bump to latest sdk RC
alfetopito May 17, 2024
679a445
feat: view on arbiscan
alfetopito May 17, 2024
0d0470b
feat: custom surplus start date for arb1
alfetopito May 17, 2024
6297267
fix: cow balance permanently loading
alfetopito May 17, 2024
ba6d494
feat: add default RPC endpoint to suggest to wallets that dont have arb1
alfetopito May 17, 2024
56bcaf2
fix: do not break when prod getTxOrders api fails
alfetopito May 17, 2024
7810014
fix(explorer): use same RPC urls as in CoW Swap (#4442)
shoom3301 May 20, 2024
4613747
refactor: add const WALLET_RPC_SUGGESTION
alfetopito May 21, 2024
7b211c3
refactor: simplify getExplorerLabel
alfetopito May 21, 2024
e97363a
chore: remove debug statement
alfetopito May 21, 2024
3905577
chore: type _getExplorerUrlByEnvironment return to avoid forgeting it…
alfetopito May 21, 2024
a0c1c75
feat: add 'event' and 'contract' types to etherscan url links
alfetopito May 21, 2024
a40792c
feat: use same fn to get block explorer url on explorer
alfetopito May 21, 2024
a2e955d
chore: use CHAIN_INFO for getting explorer title
alfetopito May 21, 2024
8e3b390
chore: remove leading / from arbiscan explorer link
alfetopito May 21, 2024
92d887d
fix: fix explorer build
alfetopito May 21, 2024
847c594
fix: fix cowswap build
alfetopito May 21, 2024
37bf405
chore: use metamask's suggested arb1 rpc url
alfetopito May 21, 2024
c618015
chore: try a different default rpc provider
alfetopito May 21, 2024
0d9dc6e
chore: bump cow-sdk to final release version 5.3.0
alfetopito May 22, 2024
09f2d52
refactor: use CHAIN_INFO.addressPrefix instead of CHAIN_SHORT_NAME
alfetopito May 22, 2024
0f84787
refactor: misc pr comments
alfetopito May 22, 2024
0697f2f
chore: mist lint fixes
alfetopito May 22, 2024
410cbf5
feat: use light and dark token logos (#4469)
alfetopito May 23, 2024
638b39e
feat: arbitrum feature flag (#4478)
alfetopito May 23, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ jobs:
REACT_APP_INFURA_KEY=${{ secrets.REACT_APP_INFURA_KEY }}
REACT_APP_NETWORK_URL_1=${{ secrets.REACT_APP_NETWORK_URL_1 }}
REACT_APP_NETWORK_URL_100=${{ secrets.REACT_APP_NETWORK_URL_100 }}
REACT_APP_NETWORK_URL_42161=${{ secrets.REACT_APP_NETWORK_URL_42161 }}
REACT_APP_NETWORK_URL_11155111=${{ secrets.REACT_APP_NETWORK_URL_11155111 }}
REACT_APP_WC_PROJECT_ID=${{ secrets.REACT_APP_WC_PROJECT_ID }}
REACT_APP_IPFS_READ_URI=${{ secrets.REACT_APP_IPFS_READ_URI }}
REACT_APP_EXPLORER_SENTRY_DSN=${{ secrets.EXPLORER_SENTRY_DSN }}
REACT_APP_EXPLORER_GOOGLE_ANALYTICS_ID=${{ secrets.EXPLORER_GOOGLE_ANALYTICS_ID }}
REACT_APP_SUBGRAPH_URL_MAINNET=${{ secrets.REACT_APP_SUBGRAPH_URL_MAINNET }}
REACT_APP_SUBGRAPH_URL_ARBITRUM_ONE=${{ secrets.REACT_APP_SUBGRAPH_URL_ARBITRUM_ONE }}
REACT_APP_SUBGRAPH_URL_GNOSIS_CHAIN=${{ secrets.REACT_APP_SUBGRAPH_URL_GNOSIS_CHAIN }}
vercel build -t ${{ secrets.VERCEL_TOKEN }} --prod

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Alternatively you can define the RPC URLs directly with the following environmen
REACT_APP_NETWORK_URL_1: https://...
REACT_APP_NETWORK_URL_11155111: https://...
REACT_APP_NETWORK_URL_100: https://...
REACT_APP_NETWORK_URL_42161: https://...
```

Additionally, if you plan to run the integration tests locally you must define:
Expand Down
2 changes: 1 addition & 1 deletion apps/cow-fi/services/cms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export async function getArticleBySlug(slug: string): Promise<Article | null> {
* @param slug Slug of the category
*
* @throws Error if slug is not found
* @throws Error if multiple categorys are found with the same slug
* @throws Error if multiple categories are found with the same slug
*
* @returns Article with the given slug
*/
Expand Down
30 changes: 12 additions & 18 deletions apps/cowswap-frontend/src/api/gasPrices/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SupportedChainId as ChainId } from '@cowprotocol/cow-sdk'

import { fetchWithRateLimit } from 'common/utils/fetch'

const fetchRateLimitted = fetchWithRateLimit({
const fetchRateLimited = fetchWithRateLimit({
rateLimit: {
tokensPerInterval: 3,
interval: 'second',
Expand Down Expand Up @@ -39,13 +39,7 @@ const priceMap: GasPrices = {

class GasFeeApi {
getUrl(chainId: ChainId): string {
const baseUrl = GAS_FEE_ENDPOINTS[chainId]

if (chainId !== ChainId.GNOSIS_CHAIN) {
return `${baseUrl}?chainId=${chainId}`
}

return baseUrl
return GAS_FEE_ENDPOINTS[chainId]
}

supportedChain(chainId: ChainId): boolean {
Expand All @@ -54,9 +48,9 @@ class GasFeeApi {

getHeaders(chainId: ChainId): { headers?: Headers } {
const headers: { [key: string]: any } = {}
const apiKey = GAS_API_KEYS[chainId] || ''
const apiKey = GAS_API_KEYS[chainId]

if (chainId !== ChainId.GNOSIS_CHAIN) {
if (apiKey) {
headers.headers = new Headers({
Authorization: apiKey,
})
Expand Down Expand Up @@ -91,13 +85,8 @@ class GasFeeApi {
slow: null,
}

// Parse data for Gnosis chain (from Blockscout)
if (chainId === ChainId.GNOSIS_CHAIN) {
for (const key of Object.keys(priceMap)) {
output[key as keyof GasPrices] = this.toWei(json[key])
}
} else {
// Parse data for other chains (from Blocknative)
if (this.getUrl(chainId).match(/blocknative/)) {
// Parse data from Blocknative
const prices = json?.blockPrices[0]?.estimatedPrices

if (prices) {
Expand All @@ -106,6 +95,11 @@ class GasFeeApi {
output[key as keyof GasPrices] = this.toWei(price)
}
}
} else {
// Parse data from Blockscout
for (const key of Object.keys(priceMap)) {
output[key as keyof GasPrices] = this.toWei(json[key])
}
}

return output
Expand All @@ -114,7 +108,7 @@ class GasFeeApi {
async fetchData(chainId: ChainId) {
const url = this.getUrl(chainId)
const headers = this.getHeaders(chainId)
const response = await fetchRateLimitted(url, headers)
const response = await fetchRateLimited(url, headers)

return response.json()
}
Expand Down
8 changes: 2 additions & 6 deletions apps/cowswap-frontend/src/api/gnosisProtocol/priceApi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RAW_CODE_LINK } from '@cowprotocol/common-const'
import { environmentName } from '@cowprotocol/common-utils'
import { SupportedChainId } from '@cowprotocol/cow-sdk'
import { SupportedChainId, mapSupportedNetworks } from '@cowprotocol/cow-sdk'

import { GpPriceStrategy } from 'legacy/state/gas/atoms'

Expand All @@ -9,11 +9,7 @@ const STRATEGY_URL_BASE = RAW_CODE_LINK + '/configuration/config/'
const ENV_BASE = environmentName !== 'production' ? 'barn' : environmentName
const STRATEGY_URL = STRATEGY_URL_BASE + ENV_BASE + '/strategies'

const STRATEGY_API_URL: Record<SupportedChainId, string> = {
[SupportedChainId.MAINNET]: STRATEGY_URL + '/strategy-1.json',
[SupportedChainId.GNOSIS_CHAIN]: STRATEGY_URL + '/strategy-100.json',
[SupportedChainId.SEPOLIA]: STRATEGY_URL + '/strategy-11155111.json',
}
const STRATEGY_API_URL = mapSupportedNetworks((chainId: SupportedChainId) => `${STRATEGY_URL}/strategy-${chainId}.json`)

export type PriceStrategy = {
primary: GpPriceStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { SupportedChainId } from '@cowprotocol/cow-sdk'
export function useVerifiedQuotesEnabled(chainId: SupportedChainId): boolean {
const { verifyQuotesMainnet, verifyQuotesGnosis, verifyQuotesSepolia } = useFeatureFlags()

// TODO: remove completely
const map: Record<SupportedChainId, boolean> = {
[SupportedChainId.MAINNET]: !!verifyQuotesMainnet,
[SupportedChainId.GNOSIS_CHAIN]: !!verifyQuotesGnosis,
[SupportedChainId.SEPOLIA]: !!verifyQuotesSepolia,
[SupportedChainId.ARBITRUM_ONE]: false,
}

return map[chainId]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createContext, ReactNode, useCallback, useContext, useEffect, useMemo, useState } from 'react'

import { useIsWindowVisible } from '@cowprotocol/common-hooks'
import { useWalletChainId, useWalletProvider } from '@cowprotocol/wallet-provider'

import { useIsWindowVisible } from './useIsWindowVisible'

const MISSING_PROVIDER = Symbol()
const BlockNumberContext = createContext<
Expand Down
4 changes: 3 additions & 1 deletion apps/cowswap-frontend/src/common/hooks/useContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ export function useGP2SettlementContract(): GPv2Settlement | null {

export function useVCowContract() {
const { chainId } = useWalletInfo()
return useContract<VCow>(chainId ? V_COW_CONTRACT_ADDRESS[chainId] : undefined, vCowAbi, true)
const vCowAddress = V_COW_CONTRACT_ADDRESS[chainId] || undefined

return useContract<VCow>(vCowAddress, vCowAbi, true)
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { useMemo } from 'react'

import { SupportedChainId } from '@cowprotocol/cow-sdk'
import { useAvailableChains } from '@cowprotocol/common-hooks'
import { useWalletChainId } from '@cowprotocol/wallet-provider'


export function useIsProviderNetworkUnsupported(): boolean {
const chainId = useWalletChainId()
const availableChains = useAvailableChains()

return useMemo(() => {
if (!chainId) return false

return !(chainId in SupportedChainId)
}, [chainId])
return availableChains.indexOf(chainId) === -1
}, [chainId, availableChains])
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import { getChainInfo } from '@cowprotocol/common-const'
import { ALL_SUPPORTED_CHAIN_IDS } from '@cowprotocol/cow-sdk'
import { useAvailableChains } from '@cowprotocol/common-hooks'

import { Trans } from '@lingui/macro'


export function useUnsupportedNetworksText(): JSX.Element {
const availableChains = useAvailableChains()

return (
<Trans>
Please connect your wallet to one of our supported networks:
<br />
{ALL_SUPPORTED_CHAIN_IDS.map((chainId) => getChainInfo(chainId)?.label)
{availableChains
.map((chainId) => getChainInfo(chainId)?.label)
.filter(Boolean)
.join(', ')}
</Trans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ const Format = styled.strong`
type ChainPrefixWarningProps = {
chainPrefixWarning: string
chainInfo: BaseChainInfo
isDarkMode: boolean
}
export default function ChainPrefixWarning({ chainPrefixWarning, chainInfo }: ChainPrefixWarningProps) {
const { label, addressPrefix, logoUrl, color } = chainInfo
export default function ChainPrefixWarning({ chainPrefixWarning, chainInfo, isDarkMode }: ChainPrefixWarningProps) {
const { label, addressPrefix, logo, color } = chainInfo
const logoUrl = isDarkMode ? logo.dark : logo.light
return (
<Wrapper>
<p>
Expand Down
19 changes: 15 additions & 4 deletions apps/cowswap-frontend/src/common/pure/NetworksList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getChainInfo } from '@cowprotocol/common-const'
import { getExplorerBaseUrl } from '@cowprotocol/common-utils'
import { ALL_SUPPORTED_CHAIN_IDS, SupportedChainId } from '@cowprotocol/cow-sdk'
import { SupportedChainId } from '@cowprotocol/cow-sdk'
import { ExternalLink } from '@cowprotocol/ui'

import { Trans } from '@lingui/macro'
Expand All @@ -9,19 +9,22 @@ import * as styledEl from './styled'

export interface NetworksListProps {
currentChainId: SupportedChainId | null
isDarkMode: boolean
availableChains: SupportedChainId[]
onSelectChain(targetChainId: SupportedChainId): void
}

export function NetworksList(props: NetworksListProps) {
const { currentChainId, onSelectChain } = props
const { currentChainId, isDarkMode, availableChains, onSelectChain } = props

return (
<>
{ALL_SUPPORTED_CHAIN_IDS.map((targetChainId: SupportedChainId) => {
{availableChains.map((targetChainId: SupportedChainId) => {
const info = getChainInfo(targetChainId)
const { label, logoUrl, bridge, explorer, explorerTitle, helpCenterUrl } = info
const { label, logo, bridge, explorer, explorerTitle, helpCenterUrl } = info

const isActive = targetChainId === currentChainId
const logoUrl = getLogo(isDarkMode, isActive, logo.dark, logo.light)

const rowContent = (
<styledEl.FlyoutRow key={targetChainId} onClick={() => onSelectChain(targetChainId)} active={isActive}>
Expand Down Expand Up @@ -69,3 +72,11 @@ export function NetworksList(props: NetworksListProps) {
</>
)
}

function getLogo(isDarkMode: boolean, isActive: boolean, darkLogo: string, lightLogo: string): string {
if (isDarkMode || isActive) {
return darkLogo
}

return lightLogo
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import {
DAI,
DAI_ARBITRUM_ONE,
NATIVE_CURRENCY_ADDRESS,
USDC_ARBITRUM_ONE,
USDC_GNOSIS_CHAIN,
USDC_MAINNET,
USDC_SEPOLIA,
USDT,
USDT_ARBITRUM_ONE,
USDT_GNOSIS_CHAIN,
WXDAI,
} from '@cowprotocol/common-const'
Expand All @@ -21,6 +24,9 @@ const STABLE_COINS: Record<SupportedChainId, string[]> = {
.map((token) => token.address.toLowerCase())
// XDAI and WXDAI are stable-coins
.concat(NATIVE_CURRENCY_ADDRESS),
[SupportedChainId.ARBITRUM_ONE]: [USDT_ARBITRUM_ONE, USDC_ARBITRUM_ONE, DAI_ARBITRUM_ONE].map((token) =>
token.address.toLowerCase()
),
[SupportedChainId.SEPOLIA]: [USDC_SEPOLIA].map((token) => token.address.toLowerCase()),
}

Expand Down
3 changes: 2 additions & 1 deletion apps/cowswap-frontend/src/common/updaters/GasUpdater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useSetAtom } from 'jotai/index'
import { useCallback, useEffect } from 'react'

import { GAS_PRICE_UPDATE_THRESHOLD } from '@cowprotocol/common-const'
import { useBlockNumber } from '@cowprotocol/common-hooks'
import { gasPriceAtom } from '@cowprotocol/core'
import { useWalletInfo } from '@cowprotocol/wallet'

Expand All @@ -14,6 +13,8 @@ import { useGasPrices } from 'legacy/state/gas/hooks'

import { gasFeeApi } from 'api/gasPrices'

import { useBlockNumber } from '../hooks/useBlockNumber'

function needsGasUpdate(now: number, lastUpdated: number, threshold: number) {
return now - lastUpdated > threshold
}
Expand Down
10 changes: 5 additions & 5 deletions apps/cowswap-frontend/src/cosmos.decorator.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import '@reach/dialog/styles.css'
import './polyfills'

import React, { StrictMode, useCallback, useContext, ReactNode, useEffect } from 'react'
import React, { ReactNode, StrictMode, useCallback, useContext, useEffect } from 'react'

import IMAGE_MOON from '@cowprotocol/assets/cow-swap/moon.svg'
import IMAGE_SUN from '@cowprotocol/assets/cow-swap/sun.svg'
import { BlockNumberProvider } from '@cowprotocol/common-hooks'
import { WalletUpdater, injectedWalletConnection } from '@cowprotocol/wallet'
import { injectedWalletConnection, WalletUpdater } from '@cowprotocol/wallet'
import { Web3ReactProvider } from '@web3-react/core'

import { LanguageProvider } from 'i18n'
import SVG from 'react-inlinesvg'
import { Provider } from 'react-redux'
import { HashRouter } from 'react-router-dom'
import { Flex } from 'rebass'
import styled from 'styled-components/macro'
import { ThemeContext } from 'styled-components/macro'
import styled, { ThemeContext } from 'styled-components/macro'

import { cowSwapStore } from 'legacy/state'
import { useDarkModeManager } from 'legacy/state/user/hooks'
import ThemeProvider, { FixedGlobalStyle, ThemedGlobalStyle } from 'legacy/theme'

import { BlockNumberProvider } from './common/hooks/useBlockNumber'

const DarkModeToggleButton = styled.button`
display: flex;
align-items: center;
Expand Down
7 changes: 3 additions & 4 deletions apps/cowswap-frontend/src/cow-react/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import 'inter-ui'
import '@cowprotocol/analytics'
import './sentry'
import { Provider as AtomProvider } from 'jotai'
import { useEffect, StrictMode, ReactNode } from 'react'
import { ReactNode, StrictMode, useEffect } from 'react'

import { BlockNumberProvider } from '@cowprotocol/common-hooks'
import { isInjectedWidget } from '@cowprotocol/common-utils'
import { nodeRemoveChildFix } from '@cowprotocol/common-utils'
import { isInjectedWidget, nodeRemoveChildFix } from '@cowprotocol/common-utils'
import { jotaiStore } from '@cowprotocol/core'
import { SnackbarsWidget } from '@cowprotocol/snackbars'
import { Web3Provider } from '@cowprotocol/wallet'
Expand All @@ -35,6 +33,7 @@ import { useInjectedWidgetParams } from 'modules/injectedWidget'
import { FeatureGuard } from 'common/containers/FeatureGuard'

import { WalletUnsupportedNetworkBanner } from '../common/containers/WalletUnsupportedNetworkBanner'
import { BlockNumberProvider } from '../common/hooks/useBlockNumber'

// Node removeChild hackaround
// based on: https://github.com/facebook/react/issues/11538#issuecomment-417504600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const ETH_AMM_LOGOS = [SushiImage, OneInchImage, ParaSwapImage, UniswapImage, Cu
const LogosPerNetwork: Record<SupportedChainId, Array<Image>> = {
[SupportedChainId.MAINNET]: ETH_AMM_LOGOS,
[SupportedChainId.SEPOLIA]: ETH_AMM_LOGOS,
[SupportedChainId.ARBITRUM_ONE]: ETH_AMM_LOGOS, // TODO: review actual AMMs on arbitrum
[SupportedChainId.GNOSIS_CHAIN]: [
SushiImage,
BaoSwapImage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ import {
parsePrefixedAddress,
} from '@cowprotocol/common-utils'
import { useENS } from '@cowprotocol/ens'
import { RowBetween } from '@cowprotocol/ui'
import { ExternalLink } from '@cowprotocol/ui'
import { UI } from '@cowprotocol/ui'
import { ExternalLink, RowBetween, UI } from '@cowprotocol/ui'
import { useWalletInfo } from '@cowprotocol/wallet'

import { t, Trans } from '@lingui/macro'
import styled from 'styled-components/macro'

import { AutoColumn } from 'legacy/components/Column'
import { useIsDarkMode } from 'legacy/state/user/hooks'

import ChainPrefixWarning from 'common/pure/ChainPrefixWarning'
import { autofocus } from 'common/utils/autofocus'
Expand Down Expand Up @@ -104,6 +103,7 @@ export function AddressInputPanel({
const chainInfo = getChainInfo(chainId)
const { address, loading, name } = useENS(value)
const [chainPrefixWarning, setChainPrefixWarning] = useState('')
const isDarkMode = useIsDarkMode()

const handleInput = useCallback(
(event: ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -139,7 +139,7 @@ export function AddressInputPanel({

return (
<InputPanel id={id}>
{chainPrefixWarning && <ChainPrefixWarning chainPrefixWarning={chainPrefixWarning} chainInfo={chainInfo} />}
{chainPrefixWarning && <ChainPrefixWarning chainPrefixWarning={chainPrefixWarning} chainInfo={chainInfo} isDarkMode={isDarkMode} />}
<ContainerRow error={error}>
<InputContainer>
<AutoColumn gap="md">
Expand Down
Loading
Loading