{children}
diff --git a/apps/web/src/components/ConfirmSwapModal/Pending.test.tsx b/apps/web/src/components/ConfirmSwapModal/Pending.test.tsx
index c1c2819d7f5..e7b5ad08ffd 100644
--- a/apps/web/src/components/ConfirmSwapModal/Pending.test.tsx
+++ b/apps/web/src/components/ConfirmSwapModal/Pending.test.tsx
@@ -1,6 +1,6 @@
import 'test-utils/tokens/mocks'
-import { ChainId, WETH9 } from '@uniswap/sdk-core'
+import { WETH9 } from '@uniswap/sdk-core'
import { Pending } from 'components/ConfirmSwapModal/Pending'
import { BigNumber } from 'ethers/lib/ethers'
import { SwapResult } from 'hooks/useSwapCallback'
@@ -13,6 +13,7 @@ import { mocked } from 'test-utils/mocked'
import { render, screen } from 'test-utils/render'
import { UniswapXOrderStatus } from 'types/uniswapx'
import { TransactionStatus } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
+import { UniverseChainId } from 'uniswap/src/types/chains'
jest.mock('state/transactions/hooks', () => ({
...jest.requireActual('state/transactions/hooks'),
@@ -36,7 +37,7 @@ const classicSwapResult: SwapResult = {
gasLimit: BigNumber.from(1000),
data: '0x',
value: BigNumber.from(0),
- chainId: ChainId.MAINNET,
+ chainId: UniverseChainId.Mainnet,
confirmations: 0,
blockNumber: undefined,
blockHash: undefined,
@@ -61,7 +62,7 @@ const filledOrderDetails: UniswapXOrderDetails = {
type: 1,
tradeType: 0,
inputCurrencyId: '0x6b175474e89094c44da98b954eedeac495271d0f',
- outputCurrencyId: WETH9[ChainId.MAINNET].address,
+ outputCurrencyId: WETH9[UniverseChainId.Mainnet].address,
inputCurrencyAmountRaw: '252074033564766400000',
expectedOutputCurrencyAmountRaw: '106841079134757921',
minimumOutputCurrencyAmountRaw: '106841079134757921',
@@ -71,7 +72,7 @@ const filledOrderDetails: UniswapXOrderDetails = {
encodedOrder: '0xencodedOrder',
id: '0x1234',
addedTime: 3,
- chainId: ChainId.MAINNET,
+ chainId: UniverseChainId.Mainnet,
expiry: 4,
offerer: '0x1234',
}
diff --git a/apps/web/src/components/ConfirmSwapModal/Pending.tsx b/apps/web/src/components/ConfirmSwapModal/Pending.tsx
index fc5ac374388..dbb545556c0 100644
--- a/apps/web/src/components/ConfirmSwapModal/Pending.tsx
+++ b/apps/web/src/components/ConfirmSwapModal/Pending.tsx
@@ -1,4 +1,3 @@
-import { ChainId } from '@uniswap/sdk-core'
import {
AnimatedEntranceConfirmationIcon,
AnimatedEntranceSubmittedIcon,
@@ -26,6 +25,7 @@ import { ThemedText } from 'theme/components/text'
import { UniswapXOrderStatus } from 'types/uniswapx'
import { uniswapUrls } from 'uniswap/src/constants/urls'
import { TransactionStatus } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
+import { UniverseChainId } from 'uniswap/src/types/chains'
import { ExplorerDataType, getExplorerLink } from 'utils/getExplorerLink'
const Container = styled(ColumnCenter)`
@@ -124,8 +124,8 @@ export function Pending({
const wrapPending = wrapTxHash != undefined && !wrapConfirmed
const transactionPending = revocationPending || tokenApprovalPending || wrapPending || swapPending
- const showSubmitted = swapPending && !swapConfirmed && chainId === ChainId.MAINNET
- const showSuccess = swapConfirmed || (chainId !== ChainId.MAINNET && swapPending)
+ const showSubmitted = swapPending && !swapConfirmed && chainId === UniverseChainId.Mainnet
+ const showSuccess = swapConfirmed || (chainId !== UniverseChainId.Mainnet && swapPending)
const currentStepContainerRef = useRef
(null)
useUnmountingAnimation(currentStepContainerRef, () => AnimationType.EXITING)
@@ -139,7 +139,7 @@ export function Pending({
} else {
return
}
- return getExplorerLink(chainId || ChainId.MAINNET, txHash, ExplorerDataType.TRANSACTION)
+ return getExplorerLink(chainId || UniverseChainId.Mainnet, txHash, ExplorerDataType.TRANSACTION)
}, [chainId, swapResult, uniswapXOrder])
// Handle special statuses for UniswapX orders
diff --git a/apps/web/src/components/CurrencyInputPanel/utils.test.ts b/apps/web/src/components/CurrencyInputPanel/utils.test.ts
index b264754adfb..183bc33bebd 100644
--- a/apps/web/src/components/CurrencyInputPanel/utils.test.ts
+++ b/apps/web/src/components/CurrencyInputPanel/utils.test.ts
@@ -1,6 +1,7 @@
-import { ChainId, Token } from '@uniswap/sdk-core'
+import { Token } from '@uniswap/sdk-core'
import { formatCurrencySymbol } from 'components/CurrencyInputPanel/utils'
import { DAI } from 'constants/tokens'
+import { UniverseChainId } from 'uniswap/src/types/chains'
describe('formatCurrencySymbol', () => {
it('should return undefined if currency is undefined', () => {
@@ -10,7 +11,7 @@ describe('formatCurrencySymbol', () => {
expect(formatCurrencySymbol(DAI)).toEqual('DAI')
})
it('should return a truncated symbol if its long', () => {
- const daiWithLongSymbol = new Token(ChainId.MAINNET, DAI.address, DAI.decimals, DAI.symbol?.repeat(10))
+ const daiWithLongSymbol = new Token(UniverseChainId.Mainnet, DAI.address, DAI.decimals, DAI.symbol?.repeat(10))
expect(formatCurrencySymbol(daiWithLongSymbol)).toEqual('DAID...AIDAI')
})
})
diff --git a/apps/web/src/components/Dialog/__snapshots__/Dialog.test.tsx.snap b/apps/web/src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
index 4882a5c9e13..92fe5e2910e 100644
--- a/apps/web/src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
+++ b/apps/web/src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
@@ -367,8 +367,8 @@ exports[` renders different button types 1`] = `
width: 50vw;
overflow-y: auto;
overflow-x: hidden;
- max-width: 420px;
max-height: 90vh;
+ max-width: 420px;
display: inline-table;
border-radius: 20px;
}
@@ -939,8 +939,8 @@ exports[` renders the Dialog component correctly 1`] = `
width: 50vw;
overflow-y: auto;
overflow-x: hidden;
- max-width: 420px;
max-height: 90vh;
+ max-width: 420px;
display: inline-table;
border-radius: 20px;
}
diff --git a/apps/web/src/components/DoubleLogo/index.tsx b/apps/web/src/components/DoubleLogo/index.tsx
index ad46bfc4ce6..33cd363d436 100644
--- a/apps/web/src/components/DoubleLogo/index.tsx
+++ b/apps/web/src/components/DoubleLogo/index.tsx
@@ -1,4 +1,4 @@
-import { ChainId, Currency } from '@uniswap/sdk-core'
+import { Currency } from '@uniswap/sdk-core'
import blankTokenUrl from 'assets/svg/blank_token.svg'
import { MissingImageLogo } from 'components/Logo/AssetLogo'
import { ChainLogo } from 'components/Logo/ChainLogo'
@@ -6,6 +6,7 @@ import { useCurrencyInfo } from 'hooks/Tokens'
import styled, { css } from 'styled-components'
import { useIsDarkMode } from 'theme/components/ThemeToggle'
import { useLogolessColorScheme } from 'ui/src'
+import { InterfaceChainId, UniverseChainId } from 'uniswap/src/types/chains'
function LogolessPlaceholder({ currency, size }: { currency?: Currency; size: string }) {
const isDarkMode = useIsDarkMode()
@@ -130,8 +131,8 @@ export const L2LogoContainer = styled.div<{ $size: number }>`
justify-content: center;
`
-function SquareL2Logo({ chainId, size }: { chainId: ChainId; size: number }) {
- if (chainId === ChainId.MAINNET) {
+function SquareL2Logo({ chainId, size }: { chainId: InterfaceChainId; size: number }) {
+ if (chainId === UniverseChainId.Mainnet) {
return null
}
diff --git a/apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx b/apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
index 5cb4f236292..15cd515c531 100644
--- a/apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
+++ b/apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
@@ -1,4 +1,3 @@
-import { ChainId } from '@uniswap/sdk-core'
import { SmallButtonPrimary } from 'components/Button'
import Column from 'components/Column'
import Modal from 'components/Modal'
@@ -14,6 +13,7 @@ import { DynamicConfigs, getConfigName } from 'uniswap/src/features/gating/confi
import { FeatureFlags, getFeatureFlagName } from 'uniswap/src/features/gating/flags'
import { useFeatureFlagWithExposureLoggingDisabled } from 'uniswap/src/features/gating/hooks'
import { Statsig } from 'uniswap/src/features/gating/sdk/statsig'
+import { WEB_SUPPORTED_CHAIN_IDS } from 'uniswap/src/types/chains'
const Wrapper = styled(Column)`
padding: 20px 16px;
@@ -224,7 +224,6 @@ export default function FeatureFlagModal() {
-
@@ -234,7 +233,7 @@ export default function FeatureFlagModal() {
!isNaN(Number(v))) as ChainId[]}
+ options={WEB_SUPPORTED_CHAIN_IDS}
parser={Number.parseInt}
config={DynamicConfigs.QuickRouteChains}
label="Enable quick routes for these chains"
diff --git a/apps/web/src/components/FeeSelector/index.tsx b/apps/web/src/components/FeeSelector/index.tsx
index e05509a2b89..169785f0c7b 100644
--- a/apps/web/src/components/FeeSelector/index.tsx
+++ b/apps/web/src/components/FeeSelector/index.tsx
@@ -19,6 +19,7 @@ import { Box } from 'rebass'
import styled, { keyframes } from 'styled-components'
import { ThemedText } from 'theme/components'
import { sendAnalyticsEvent } from 'uniswap/src/features/telemetry/send'
+import { InterfaceChainId } from 'uniswap/src/types/chains'
import { useTrace } from 'utilities/src/telemetry/trace/TraceContext'
import { useFormatter } from 'utils/formatNumbers'
@@ -191,7 +192,7 @@ export default function FeeSelector({
`;
-exports[`ChainSelectorRow should match snapshot for chainId 30 1`] = `
-.c0 {
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- background: none;
- border: none;
- border-radius: 12px;
- color: #222222;
- cursor: pointer;
- display: grid;
- grid-template-columns: min-content 1fr min-content;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- line-height: 20px;
- opacity: 1;
- padding: 10px 8px;
- text-align: left;
- outline: none;
- -webkit-transition: 250ms ease background-color;
- transition: 250ms ease background-color;
- width: 100%;
-}
-
-.c0:hover {
- background-color: #22222212;
-}
-
-.c1 {
- grid-column: 3;
- grid-row: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- width: 20px;
-}
-
-