diff --git a/src/__swaps__/screens/Swap/components/CoinRow.tsx b/src/__swaps__/screens/Swap/components/CoinRow.tsx index a3b006f1b51..20b17a3b5c7 100644 --- a/src/__swaps__/screens/Swap/components/CoinRow.tsx +++ b/src/__swaps__/screens/Swap/components/CoinRow.tsx @@ -17,7 +17,7 @@ import React, { useCallback, useMemo } from 'react'; import { GestureResponderEvent } from 'react-native'; import { OnPressMenuItemEventObject } from 'react-native-ios-context-menu'; import { SwapCoinIcon } from './SwapCoinIcon'; -import { SUPPORTED_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_CHAIN_IDS } from '@/chains'; export const COIN_ROW_WITH_PADDING_HEIGHT = 56; diff --git a/src/__swaps__/screens/Swap/components/ReviewPanel.tsx b/src/__swaps__/screens/Swap/components/ReviewPanel.tsx index b9d442c1a51..eca49b3f12f 100644 --- a/src/__swaps__/screens/Swap/components/ReviewPanel.tsx +++ b/src/__swaps__/screens/Swap/components/ReviewPanel.tsx @@ -48,7 +48,7 @@ import { NavigationSteps, useSwapContext } from '../providers/swap-provider'; import { AnimatedSwitch } from './AnimatedSwitch'; import { EstimatedSwapGasFee, EstimatedSwapGasFeeSlot } from './EstimatedSwapGasFee'; import { UnmountOnAnimatedReaction } from './UnmountOnAnimatedReaction'; -import { chainsLabel } from '@/chains/chains'; +import { chainsLabel } from '@/chains'; import { ChainId } from '@/chains/types'; const UNKNOWN_LABEL = i18n.t(i18n.l.swap.unknown); diff --git a/src/__swaps__/screens/Swap/components/TokenList/ChainSelection.tsx b/src/__swaps__/screens/Swap/components/TokenList/ChainSelection.tsx index a21f900fe43..9bf673df4bc 100644 --- a/src/__swaps__/screens/Swap/components/TokenList/ChainSelection.tsx +++ b/src/__swaps__/screens/Swap/components/TokenList/ChainSelection.tsx @@ -18,7 +18,7 @@ import { userAssetsStore } from '@/state/assets/userAssets'; import { swapsStore } from '@/state/swaps/swapsStore'; import { showActionSheetWithOptions } from '@/utils'; import { OnPressMenuItemEventObject } from 'react-native-ios-context-menu'; -import { chainsLabel, chainsName } from '@/chains/chains'; +import { chainsLabel, chainsName } from '@/chains'; type ChainSelectionProps = { allText?: string; diff --git a/src/__swaps__/screens/Swap/providers/swap-provider.tsx b/src/__swaps__/screens/Swap/providers/swap-provider.tsx index a690324532f..6cd2d1b843b 100644 --- a/src/__swaps__/screens/Swap/providers/swap-provider.tsx +++ b/src/__swaps__/screens/Swap/providers/swap-provider.tsx @@ -56,7 +56,7 @@ import { SyncGasStateToSharedValues, SyncQuoteSharedValuesToState } from './Sync import { performanceTracking, Screens, TimeToSignOperation } from '@/state/performance/performance'; import { getRemoteConfig } from '@/model/remoteConfig'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; -import { chainsNativeAsset, supportedFlashbotsChainIds } from '@/chains/chains'; +import { chainsNativeAsset, supportedFlashbotsChainIds } from '@/chains'; const swapping = i18n.t(i18n.l.swap.actions.swapping); const holdToSwap = i18n.t(i18n.l.swap.actions.hold_to_swap); diff --git a/src/__swaps__/utils/assets.ts b/src/__swaps__/utils/assets.ts index ca57e3f94c6..7f5d6f0bb9b 100644 --- a/src/__swaps__/utils/assets.ts +++ b/src/__swaps__/utils/assets.ts @@ -26,7 +26,7 @@ import { convertRawAmountToDecimalFormat, } from '@/__swaps__/utils/numbers'; import { isLowerCaseMatch, isLowerCaseMatchWorklet } from '@/__swaps__/utils/strings'; -import { chainsIdByName, chainsName } from '@/chains/chains'; +import { chainsIdByName, chainsName } from '@/chains'; export const isSameAsset = (a1: Pick, a2: Pick) => +a1.chainId === +a2.chainId && isLowerCaseMatch(a1.address, a2.address); diff --git a/src/__swaps__/utils/swaps.ts b/src/__swaps__/utils/swaps.ts index 12117669d03..6b70afdf030 100644 --- a/src/__swaps__/utils/swaps.ts +++ b/src/__swaps__/utils/swaps.ts @@ -39,7 +39,7 @@ import { AddressOrEth, ExtendedAnimatedAssetWithColors, ParsedSearchAsset } from import { inputKeys } from '../types/swap'; import { valueBasedDecimalFormatter } from './decimalFormatter'; import { convertAmountToRawAmount } from './numbers'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; // /---- 🎨 Color functions 🎨 ----/ // // diff --git a/src/__swaps__/utils/userChains.ts b/src/__swaps__/utils/userChains.ts index 0e766af53af..d10e850fe4f 100644 --- a/src/__swaps__/utils/userChains.ts +++ b/src/__swaps__/utils/userChains.ts @@ -22,7 +22,7 @@ import { } from 'viem/chains'; import { ChainId } from '@/chains/types'; -import { chainsLabel } from '@/chains/chains'; +import { chainsLabel } from '@/chains'; export const chainIdMap: Record< ChainId.mainnet | ChainId.optimism | ChainId.polygon | ChainId.base | ChainId.bsc | ChainId.zora | ChainId.avalanche, diff --git a/src/chains/chains.ts b/src/chains/index.ts similarity index 100% rename from src/chains/chains.ts rename to src/chains/index.ts diff --git a/src/components/DappBrowser/control-panel/ControlPanel.tsx b/src/components/DappBrowser/control-panel/ControlPanel.tsx index ff4c0bfdcb5..4c635fd4a9a 100644 --- a/src/components/DappBrowser/control-panel/ControlPanel.tsx +++ b/src/components/DappBrowser/control-panel/ControlPanel.tsx @@ -62,7 +62,7 @@ import { swapsStore } from '@/state/swaps/swapsStore'; import { userAssetsStore } from '@/state/assets/userAssets'; import { greaterThan } from '@/helpers/utilities'; import { ChainId } from '@/chains/types'; -import { chainsLabel, defaultChains, supportedWalletConnectChainIds } from '@/chains/chains'; +import { chainsLabel, defaultChains, supportedWalletConnectChainIds } from '@/chains'; const PAGES = { HOME: 'home', diff --git a/src/components/DappBrowser/handleProviderRequest.ts b/src/components/DappBrowser/handleProviderRequest.ts index 0840ab0fadf..8b432f05c79 100644 --- a/src/components/DappBrowser/handleProviderRequest.ts +++ b/src/components/DappBrowser/handleProviderRequest.ts @@ -14,7 +14,7 @@ import { getDappMetadata } from '@/resources/metadata/dapp'; import { useAppSessionsStore } from '@/state/appSessions'; import { BigNumber } from '@ethersproject/bignumber'; import { ChainId } from '@/chains/types'; -import { defaultChains, SUPPORTED_CHAIN_IDS } from '@/chains/chains'; +import { defaultChains, SUPPORTED_CHAIN_IDS } from '@/chains'; import { Chain } from '@wagmi/chains'; export type ProviderRequestPayload = RequestArguments & { diff --git a/src/components/L2Disclaimer.js b/src/components/L2Disclaimer.js index 530b239ce2f..04fe6024fd3 100644 --- a/src/components/L2Disclaimer.js +++ b/src/components/L2Disclaimer.js @@ -10,7 +10,7 @@ import { darkModeThemeColors } from '@/styles/colors'; import * as lang from '@/languages'; import { isL2Chain } from '@/handlers/web3'; import { EthCoinIcon } from './coin-icon/EthCoinIcon'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; const L2Disclaimer = ({ chainId, diff --git a/src/components/Transactions/TransactionDetailsCard.tsx b/src/components/Transactions/TransactionDetailsCard.tsx index dd02f8f2568..96d0af6092b 100644 --- a/src/components/Transactions/TransactionDetailsCard.tsx +++ b/src/components/Transactions/TransactionDetailsCard.tsx @@ -20,7 +20,7 @@ import { CARD_BORDER_WIDTH, EXPANDED_CARD_TOP_INSET, } from '@/components/Transactions/constants'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; interface TransactionDetailsCardProps { chainId: ChainId; diff --git a/src/components/Transactions/TransactionSimulatedEventRow.tsx b/src/components/Transactions/TransactionSimulatedEventRow.tsx index 663717066d3..c98ab430c65 100644 --- a/src/components/Transactions/TransactionSimulatedEventRow.tsx +++ b/src/components/Transactions/TransactionSimulatedEventRow.tsx @@ -17,7 +17,7 @@ import { useExternalToken } from '@/resources/assets/externalAssetsQuery'; import { EventInfo, EventType } from '@/components/Transactions/types'; import { infoForEventType, CARD_ROW_HEIGHT } from '@/components/Transactions/constants'; import { EventIcon } from '@/components/Transactions/TransactionIcons'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; type TransactionSimulatedEventRowProps = { amount: string | 'unlimited'; diff --git a/src/components/Transactions/TransactionSimulationCard.tsx b/src/components/Transactions/TransactionSimulationCard.tsx index 7e32379cd52..4452f1dbd26 100644 --- a/src/components/Transactions/TransactionSimulationCard.tsx +++ b/src/components/Transactions/TransactionSimulationCard.tsx @@ -28,7 +28,7 @@ import { timingConfig, } from '@/components/Transactions/constants'; import { ChainId } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; interface TransactionSimulationCardProps { chainId: ChainId; diff --git a/src/components/cards/NFTOffersCard/Offer.tsx b/src/components/cards/NFTOffersCard/Offer.tsx index 51ec5e02dfb..c9c0afd6f64 100644 --- a/src/components/cards/NFTOffersCard/Offer.tsx +++ b/src/components/cards/NFTOffersCard/Offer.tsx @@ -23,7 +23,7 @@ import { useExternalToken } from '@/resources/assets/externalAssetsQuery'; import { useAccountSettings } from '@/hooks'; import { Network } from '@/chains/types'; import { AddressOrEth } from '@/__swaps__/types/assets'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const TWO_HOURS_MS = 2 * 60 * 60 * 1000; export const CELL_HORIZONTAL_PADDING = 7; diff --git a/src/components/context-menu-buttons/ChainContextMenu.tsx b/src/components/context-menu-buttons/ChainContextMenu.tsx index 763eec13007..964da0cb9f4 100644 --- a/src/components/context-menu-buttons/ChainContextMenu.tsx +++ b/src/components/context-menu-buttons/ChainContextMenu.tsx @@ -6,7 +6,7 @@ import * as i18n from '@/languages'; import { ChainId } from '@/chains/types'; import { showActionSheetWithOptions } from '@/utils'; import { userAssetsStore } from '@/state/assets/userAssets'; -import { chainsLabel, chainsName } from '@/chains/chains'; +import { chainsLabel, chainsName } from '@/chains'; interface DefaultButtonOptions { iconColor?: TextProps['color']; diff --git a/src/components/discover/DiscoverSearchInput.js b/src/components/discover/DiscoverSearchInput.js index 01133e9160e..7d82759befe 100644 --- a/src/components/discover/DiscoverSearchInput.js +++ b/src/components/discover/DiscoverSearchInput.js @@ -13,7 +13,7 @@ import styled from '@/styled-thing'; import { margin, padding } from '@/styles'; import { deviceUtils } from '@/utils'; import DiscoverSheetContext from '@/screens/discover/DiscoverScreenContext'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; export const ExchangeSearchHeight = 40; const ExchangeSearchWidth = deviceUtils.dimensions.width - 30; diff --git a/src/components/exchange/ConfirmExchangeButton.js b/src/components/exchange/ConfirmExchangeButton.js index fad45648c64..2d1c786d13e 100644 --- a/src/components/exchange/ConfirmExchangeButton.js +++ b/src/components/exchange/ConfirmExchangeButton.js @@ -14,7 +14,7 @@ import Routes from '@/navigation/routesNames'; import { lightModeThemeColors } from '@/styles'; import { useTheme } from '@/theme'; import handleSwapErrorCodes from '@/utils/exchangeErrorCodes'; -import { chainsNativeAsset } from '@/chains/chains'; +import { chainsNativeAsset } from '@/chains'; const NOOP = () => null; diff --git a/src/components/exchange/CurrencySelectModalHeader.tsx b/src/components/exchange/CurrencySelectModalHeader.tsx index 91113d70a3c..ed4cffbd286 100644 --- a/src/components/exchange/CurrencySelectModalHeader.tsx +++ b/src/components/exchange/CurrencySelectModalHeader.tsx @@ -8,7 +8,7 @@ import { useNavigation } from '@/navigation'; import Routes from '@/navigation/routesNames'; import RainbowCoinIcon from '../coin-icon/RainbowCoinIcon'; import { useTheme } from '@/theme'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; export const CurrencySelectModalHeaderHeight = 59; diff --git a/src/components/exchange/NetworkSwitcher.js b/src/components/exchange/NetworkSwitcher.js index e7e1edc00ab..efdb540ad31 100644 --- a/src/components/exchange/NetworkSwitcher.js +++ b/src/components/exchange/NetworkSwitcher.js @@ -9,7 +9,7 @@ import { Text } from '../text'; import { padding, position } from '@/styles'; import { showActionSheetWithOptions } from '@/utils'; import { EthCoinIcon } from '../coin-icon/EthCoinIcon'; -import { chainsLabel, chainsName, defaultChains, supportedSwapChainIds } from '@/chains/chains'; +import { chainsLabel, chainsName, defaultChains, supportedSwapChainIds } from '@/chains'; import { isL2Chain } from '@/handlers/web3'; const networkMenuItems = supportedSwapChainIds diff --git a/src/components/exchange/NetworkSwitcherv2.tsx b/src/components/exchange/NetworkSwitcherv2.tsx index bf7678d34cb..a293f31be76 100644 --- a/src/components/exchange/NetworkSwitcherv2.tsx +++ b/src/components/exchange/NetworkSwitcherv2.tsx @@ -8,7 +8,7 @@ import { position } from '@rainbow-me/styles'; import { useTheme } from '@/theme'; import { EthCoinIcon } from '../coin-icon/EthCoinIcon'; import { ChainId } from '@/chains/types'; -import { chainsLabel, defaultChains, supportedSwapChainIds } from '@/chains/chains'; +import { chainsLabel, defaultChains, supportedSwapChainIds } from '@/chains'; const NetworkSwitcherv2 = ({ currentChainId, diff --git a/src/components/exchange/exchangeAssetRowContextMenuProps.ts b/src/components/exchange/exchangeAssetRowContextMenuProps.ts index 2d19bdc1171..63c776cebff 100644 --- a/src/components/exchange/exchangeAssetRowContextMenuProps.ts +++ b/src/components/exchange/exchangeAssetRowContextMenuProps.ts @@ -4,7 +4,7 @@ import { NativeSyntheticEvent } from 'react-native'; import { setClipboard } from '../../hooks/useClipboard'; import { abbreviations, ethereumUtils, haptics, showActionSheetWithOptions } from '@/utils'; import { ChainId } from '@/chains/types'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const buildBlockExplorerAction = (chainId: ChainId) => { const blockExplorerText = lang.t('exchange.coin_row.view_on', { diff --git a/src/components/expanded-state/AvailableNetworks.js b/src/components/expanded-state/AvailableNetworks.js index 125b36c1d5c..4c32fe9c2be 100644 --- a/src/components/expanded-state/AvailableNetworks.js +++ b/src/components/expanded-state/AvailableNetworks.js @@ -14,7 +14,7 @@ import Divider from '../Divider'; import { Text } from '../text'; import { EthCoinIcon } from '../coin-icon/EthCoinIcon'; import { ChainId } from '@/chains/types'; -import { defaultChains } from '@/chains/chains'; +import { defaultChains } from '@/chains'; const AvailableNetworksv1 = ({ asset, networks, hideDivider, marginBottom = 24, marginHorizontal = 19, prominent }) => { const { colors } = useTheme(); diff --git a/src/components/expanded-state/AvailableNetworksv2.tsx b/src/components/expanded-state/AvailableNetworksv2.tsx index 0b38a97735c..52917d1d693 100644 --- a/src/components/expanded-state/AvailableNetworksv2.tsx +++ b/src/components/expanded-state/AvailableNetworksv2.tsx @@ -25,7 +25,7 @@ import { swapsStore } from '@/state/swaps/swapsStore'; import { InteractionManager } from 'react-native'; import { ChainId } from '@/chains/types'; import { getUniqueId } from '@/utils/ethereumUtils'; -import { chainsLabel, chainsName, defaultChains, supportedSwapChainIds } from '@/chains/chains'; +import { chainsLabel, chainsName, defaultChains, supportedSwapChainIds } from '@/chains'; import { isL2Chain } from '@/handlers/web3'; const NOOP = () => null; diff --git a/src/components/expanded-state/SwapDetailsState.js b/src/components/expanded-state/SwapDetailsState.js index 8a94d7d3430..19af013c189 100644 --- a/src/components/expanded-state/SwapDetailsState.js +++ b/src/components/expanded-state/SwapDetailsState.js @@ -18,7 +18,7 @@ import { padding, position } from '@/styles'; import { abbreviations, ethereumUtils } from '@/utils'; import { getCrosschainSwapServiceTime } from '@/handlers/swap'; import { SwapPriceImpactType } from '@/hooks/usePriceImpactDetails'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const AnimatedContainer = styled(Animated.View)({ ...position.sizeAsObject('100%'), diff --git a/src/components/expanded-state/asset/ChartExpandedState.js b/src/components/expanded-state/asset/ChartExpandedState.js index 9a6bfb11017..848f8f30cdf 100644 --- a/src/components/expanded-state/asset/ChartExpandedState.js +++ b/src/components/expanded-state/asset/ChartExpandedState.js @@ -36,7 +36,7 @@ import { Box } from '@/design-system'; import { useExternalToken } from '@/resources/assets/externalAssetsQuery'; import { bigNumberFormat } from '@/helpers/bigNumberFormat'; import { greaterThanOrEqualTo } from '@/helpers/utilities'; -import { chainsName, supportedSwapChainIds } from '@/chains/chains'; +import { chainsName, supportedSwapChainIds } from '@/chains'; const defaultCarouselHeight = 60; const baseHeight = 386 + (android && 20 - getSoftMenuBarHeight()) - defaultCarouselHeight; diff --git a/src/components/expanded-state/swap-details/SwapDetailsExchangeRow.js b/src/components/expanded-state/swap-details/SwapDetailsExchangeRow.js index 0dddee8b8c5..ca5cadcf4cc 100644 --- a/src/components/expanded-state/swap-details/SwapDetailsExchangeRow.js +++ b/src/components/expanded-state/swap-details/SwapDetailsExchangeRow.js @@ -10,7 +10,7 @@ import { usePrevious, useStepper } from '@/hooks'; import { ImgixImage } from '@/components/images'; import { getExchangeIconUrl, magicMemo } from '@/utils'; import { SocketBridges } from '@/references/swap/bridges'; -import { SUPPORTED_CHAINS } from '@/chains/chains'; +import { SUPPORTED_CHAINS } from '@/chains'; const parseExchangeName = name => { const networks = SUPPORTED_CHAINS.map(network => network.name.toLowerCase()); diff --git a/src/components/expanded-state/swap-details/SwapDetailsRewardRow.tsx b/src/components/expanded-state/swap-details/SwapDetailsRewardRow.tsx index 6f7abb96689..017565f83bc 100644 --- a/src/components/expanded-state/swap-details/SwapDetailsRewardRow.tsx +++ b/src/components/expanded-state/swap-details/SwapDetailsRewardRow.tsx @@ -9,7 +9,7 @@ import { ChainBadge } from '@/components/coin-icon'; import { useTheme } from '@/theme'; import * as i18n from '@/languages'; import { ChainId } from '@/chains/types'; -import { chainsNativeAsset } from '@/chains/chains'; +import { chainsNativeAsset } from '@/chains'; export function SwapDetailsRewardRow({ reward }: { reward: Reward }) { const { navigate } = useNavigation(); diff --git a/src/components/gas/GasSpeedButton.js b/src/components/gas/GasSpeedButton.js index 9f67938f906..209d2dd2a39 100644 --- a/src/components/gas/GasSpeedButton.js +++ b/src/components/gas/GasSpeedButton.js @@ -28,7 +28,7 @@ import { IS_ANDROID } from '@/env'; import { ContextMenu } from '../context-menu'; import { EthCoinIcon } from '../coin-icon/EthCoinIcon'; import { ChainId } from '@/chains/types'; -import { chainsGasSpeeds } from '@/chains/chains'; +import { chainsGasSpeeds } from '@/chains'; const { GAS_EMOJIS, GAS_ICONS, GasSpeedOrder, CUSTOM, URGENT, NORMAL, FAST, getGasLabel } = gasUtils; diff --git a/src/components/positions/PositionsCard.tsx b/src/components/positions/PositionsCard.tsx index 79a63418953..6a49be54cf8 100644 --- a/src/components/positions/PositionsCard.tsx +++ b/src/components/positions/PositionsCard.tsx @@ -18,7 +18,7 @@ import RainbowCoinIcon from '../coin-icon/RainbowCoinIcon'; import { useAccountSettings } from '@/hooks'; import { useExternalToken } from '@/resources/assets/externalAssetsQuery'; import { AddressOrEth } from '@/__swaps__/types/assets'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; type PositionCardProps = { position: RainbowPosition; diff --git a/src/components/remote-promo-sheet/check-fns/hasSwapTxn.ts b/src/components/remote-promo-sheet/check-fns/hasSwapTxn.ts index 9e2ecfb9fa5..738e33cdf58 100644 --- a/src/components/remote-promo-sheet/check-fns/hasSwapTxn.ts +++ b/src/components/remote-promo-sheet/check-fns/hasSwapTxn.ts @@ -1,5 +1,5 @@ import type { EthereumAddress, RainbowTransaction } from '@/entities'; -import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; import { queryClient } from '@/react-query/queryClient'; import store from '@/redux/store'; import { consolidatedTransactionsQueryKey } from '@/resources/transactions/consolidatedTransactions'; diff --git a/src/components/sheet/sheet-action-buttons/SwapActionButton.tsx b/src/components/sheet/sheet-action-buttons/SwapActionButton.tsx index 570201e5bd3..ac86628dcea 100644 --- a/src/components/sheet/sheet-action-buttons/SwapActionButton.tsx +++ b/src/components/sheet/sheet-action-buttons/SwapActionButton.tsx @@ -16,7 +16,7 @@ import { swapsStore } from '@/state/swaps/swapsStore'; import { InteractionManager } from 'react-native'; import { AddressOrEth, AssetType, ParsedSearchAsset } from '@/__swaps__/types/assets'; import exchangeModalTypes from '@/helpers/exchangeModalTypes'; -import { chainsIdByName, chainsName } from '@/chains/chains'; +import { chainsIdByName, chainsName } from '@/chains'; type SwapActionButtonProps = { asset: RainbowToken; diff --git a/src/components/toasts/TestnetToast.js b/src/components/toasts/TestnetToast.js index e31f8e2ffa0..9b77cc6bd8f 100644 --- a/src/components/toasts/TestnetToast.js +++ b/src/components/toasts/TestnetToast.js @@ -5,7 +5,7 @@ import Toast from './Toast'; import { useInternetStatus } from '@/hooks'; import { ChainId } from '@/chains/types'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; -import { chainsName, chainsNativeAsset } from '@/chains/chains'; +import { chainsName, chainsNativeAsset } from '@/chains'; const TestnetToast = ({ chainId }) => { const { connectedToHardhat } = useConnectedToHardhatStore(); diff --git a/src/components/walletconnect-list/WalletConnectListItem.js b/src/components/walletconnect-list/WalletConnectListItem.js index 049e7e1d130..5d1055524c8 100644 --- a/src/components/walletconnect-list/WalletConnectListItem.js +++ b/src/components/walletconnect-list/WalletConnectListItem.js @@ -24,7 +24,7 @@ import styled from '@/styled-thing'; import { padding } from '@/styles'; import { showActionSheetWithOptions } from '@/utils'; import { ChainId } from '@/chains/types'; -import { chainsIdByName, chainsLabel, chainsNativeAsset } from '@/chains/chains'; +import { chainsIdByName, chainsLabel, chainsNativeAsset } from '@/chains'; const ContainerPadding = 15; const VendorLogoIconSize = 50; diff --git a/src/components/walletconnect-list/WalletConnectV2ListItem.tsx b/src/components/walletconnect-list/WalletConnectV2ListItem.tsx index 4ec93e1ccbf..e7b90d6435d 100644 --- a/src/components/walletconnect-list/WalletConnectV2ListItem.tsx +++ b/src/components/walletconnect-list/WalletConnectV2ListItem.tsx @@ -26,7 +26,7 @@ import { Box, Inline } from '@/design-system'; import ChainBadge from '@/components/coin-icon/ChainBadge'; import { EthCoinIcon } from '../coin-icon/EthCoinIcon'; import { ChainId } from '@/chains/types'; -import { supportedWalletConnectChainIds } from '@/chains/chains'; +import { supportedWalletConnectChainIds } from '@/chains'; const CONTAINER_PADDING = 15; const VENDOR_LOGO_ICON_SIZE = 50; diff --git a/src/featuresToUnlock/tokenGatedUtils.ts b/src/featuresToUnlock/tokenGatedUtils.ts index 10b34d26c3a..014f178732a 100644 --- a/src/featuresToUnlock/tokenGatedUtils.ts +++ b/src/featuresToUnlock/tokenGatedUtils.ts @@ -3,7 +3,7 @@ import { EthereumAddress } from '@/entities'; import { getProvider } from '@/handlers/web3'; import { tokenGateCheckerAbi } from '@/references'; import { Network } from '@/chains/types'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; export type TokenGateCheckerNetwork = | Network.arbitrum diff --git a/src/handlers/assets.ts b/src/handlers/assets.ts index 6b3bbe4c3e3..1fb241b4e6f 100644 --- a/src/handlers/assets.ts +++ b/src/handlers/assets.ts @@ -3,7 +3,7 @@ import { Contract } from '@ethersproject/contracts'; import { erc20ABI } from '@/references'; import { convertAmountToBalanceDisplay, convertRawAmountToDecimalFormat } from '@/helpers/utilities'; import { ChainId } from '@/chains/types'; -import { chainsNativeAsset } from '@/chains/chains'; +import { chainsNativeAsset } from '@/chains'; import { isLowerCaseMatch } from '@/utils'; import { AddressOrEth } from '@/__swaps__/types/assets'; diff --git a/src/handlers/gasFees.ts b/src/handlers/gasFees.ts index 1714f1e5030..8a63ce38bf6 100644 --- a/src/handlers/gasFees.ts +++ b/src/handlers/gasFees.ts @@ -1,4 +1,4 @@ -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; import { RainbowFetchClient } from '../rainbow-fetch'; import { ChainId } from '@/chains/types'; diff --git a/src/handlers/tokenSearch.ts b/src/handlers/tokenSearch.ts index 061c41e3d89..f5b6f85fa98 100644 --- a/src/handlers/tokenSearch.ts +++ b/src/handlers/tokenSearch.ts @@ -6,7 +6,7 @@ import { logger, RainbowError } from '@/logger'; import { EthereumAddress } from '@rainbow-me/swaps'; import { RainbowToken, TokenSearchToken } from '@/entities/tokens'; import ethereumUtils from '@/utils/ethereumUtils'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; type TokenSearchApiResponse = { data: TokenSearchToken[]; diff --git a/src/handlers/web3.ts b/src/handlers/web3.ts index 35292f7e01c..a75d7a269a7 100644 --- a/src/handlers/web3.ts +++ b/src/handlers/web3.ts @@ -35,7 +35,7 @@ import { ethereumUtils } from '@/utils'; import { logger, RainbowError } from '@/logger'; import { IS_IOS, RPC_PROXY_API_KEY, RPC_PROXY_BASE_URL } from '@/env'; import { ChainId } from '@/chains/types'; -import { defaultChains } from '@/chains/chains'; +import { defaultChains } from '@/chains'; export enum TokenStandard { ERC1155 = 'ERC1155', diff --git a/src/helpers/walletConnectNetworks.ts b/src/helpers/walletConnectNetworks.ts index 5a136351a34..bebccbcb4f6 100644 --- a/src/helpers/walletConnectNetworks.ts +++ b/src/helpers/walletConnectNetworks.ts @@ -2,7 +2,7 @@ import store from '@/redux/store'; import { showActionSheetWithOptions } from '@/utils'; import * as i18n from '@/languages'; import { ChainId } from '@/chains/types'; -import { chainsLabel, defaultChains, supportedWalletConnectChainIds } from '@/chains/chains'; +import { chainsLabel, defaultChains, supportedWalletConnectChainIds } from '@/chains'; import { isL2Chain } from '@/handlers/web3'; const walletConnectChains = supportedWalletConnectChainIds.map(chainId => defaultChains[chainId]); diff --git a/src/hooks/useAccountTransactions.ts b/src/hooks/useAccountTransactions.ts index a6ba336fae9..e1c47bf5de8 100644 --- a/src/hooks/useAccountTransactions.ts +++ b/src/hooks/useAccountTransactions.ts @@ -10,7 +10,7 @@ import { RainbowTransaction } from '@/entities'; import { pendingTransactionsStore, usePendingTransactionsStore } from '@/state/pendingTransactions'; import { nonceStore } from '@/state/nonces'; import { ChainId } from '@/chains/types'; -import { SUPPORTED_CHAIN_IDS, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_CHAIN_IDS, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; export const NOE_PAGE = 30; diff --git a/src/hooks/useCalculateGasLimit.ts b/src/hooks/useCalculateGasLimit.ts index af1ade06eb9..20ca1d3c825 100644 --- a/src/hooks/useCalculateGasLimit.ts +++ b/src/hooks/useCalculateGasLimit.ts @@ -10,7 +10,7 @@ import { GasFeeParamsBySpeed } from '@/entities'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import { useGas } from '@/hooks'; import { ChainId } from '@/chains/types'; -import { needsL1SecurityFeeChains } from '@/chains/chains'; +import { needsL1SecurityFeeChains } from '@/chains'; type CalculateGasLimitProps = { isMessageRequest: boolean; diff --git a/src/hooks/useSearchCurrencyList.ts b/src/hooks/useSearchCurrencyList.ts index 20e176c85d6..a902eae1a34 100644 --- a/src/hooks/useSearchCurrencyList.ts +++ b/src/hooks/useSearchCurrencyList.ts @@ -19,7 +19,7 @@ import { IS_TEST } from '@/env'; import { useFavorites } from '@/resources/favorites'; import { getUniqueId } from '@/utils/ethereumUtils'; import { ChainId } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; type swapCurrencyListType = | 'verifiedAssets' diff --git a/src/hooks/useSwapCurrencyList.ts b/src/hooks/useSwapCurrencyList.ts index 90e83d2e914..eb08733578d 100644 --- a/src/hooks/useSwapCurrencyList.ts +++ b/src/hooks/useSwapCurrencyList.ts @@ -19,7 +19,7 @@ import { useFavorites } from '@/resources/favorites'; import { getUniqueId } from '@/utils/ethereumUtils'; import { logger } from '@/logger'; import { ChainId, Network } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; type swapCurrencyListType = | 'verifiedAssets' diff --git a/src/hooks/useSwapDerivedOutputs.ts b/src/hooks/useSwapDerivedOutputs.ts index 36445ed75d8..4444bc523d4 100644 --- a/src/hooks/useSwapDerivedOutputs.ts +++ b/src/hooks/useSwapDerivedOutputs.ts @@ -34,7 +34,7 @@ import { ethereumUtils } from '@/utils'; import { useDispatch, useSelector } from 'react-redux'; import { SwappableAsset } from '../entities/tokens'; import useAccountSettings from './useAccountSettings'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; const SWAP_POLLING_INTERVAL = 5000; diff --git a/src/hooks/useSwappableUserAssets.ts b/src/hooks/useSwappableUserAssets.ts index 7aca117fe39..e1d501fec48 100644 --- a/src/hooks/useSwappableUserAssets.ts +++ b/src/hooks/useSwappableUserAssets.ts @@ -6,7 +6,7 @@ import { useSortedUserAssets } from '@/resources/assets/useSortedUserAssets'; import { EthereumAddress, ETH_ADDRESS as ETH_ADDRESS_AGGREGATORS } from '@rainbow-me/swaps'; import { useCallback, useEffect, useMemo, useRef } from 'react'; import { ChainId } from '@/chains/types'; -import { supportedSwapChainIds } from '@/chains/chains'; +import { supportedSwapChainIds } from '@/chains'; type SwappableAddresses = Record; diff --git a/src/hooks/useWatchPendingTxs.ts b/src/hooks/useWatchPendingTxs.ts index e095e519370..e2843208b8e 100644 --- a/src/hooks/useWatchPendingTxs.ts +++ b/src/hooks/useWatchPendingTxs.ts @@ -17,7 +17,7 @@ import { getNftSortForAddress } from './useNFTsSortBy'; import { ChainId } from '@/chains/types'; import { staleBalancesStore } from '@/state/staleBalances'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; -import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; export const useWatchPendingTransactions = ({ address }: { address: string }) => { const { storePendingTransactions, setPendingTransactions } = usePendingTransactionsStore(state => ({ diff --git a/src/navigation/config.tsx b/src/navigation/config.tsx index 753d0f84480..1d3c0bcfaff 100644 --- a/src/navigation/config.tsx +++ b/src/navigation/config.tsx @@ -29,7 +29,7 @@ import { IS_ANDROID } from '@/env'; import { SignTransactionSheetRouteProp } from '@/screens/SignTransactionSheet'; import { RequestSource } from '@/utils/requestNavigationHandlers'; import { ChainId } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; export const sharedCoolModalTopOffset = safeAreaInsetValues.top; diff --git a/src/raps/actions/claimBridge.ts b/src/raps/actions/claimBridge.ts index df849e07961..d4f9addd1e5 100644 --- a/src/raps/actions/claimBridge.ts +++ b/src/raps/actions/claimBridge.ts @@ -13,7 +13,7 @@ import { Address } from 'viem'; import { ActionProps } from '../references'; import { executeCrosschainSwap } from './crosschainSwap'; import { ChainId } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; // This action is used to bridge the claimed funds to another chain export async function claimBridge({ parameters, wallet, baseNonce }: ActionProps<'claimBridge'>) { diff --git a/src/raps/actions/crosschainSwap.ts b/src/raps/actions/crosschainSwap.ts index ae736acd8bc..1325a50005b 100644 --- a/src/raps/actions/crosschainSwap.ts +++ b/src/raps/actions/crosschainSwap.ts @@ -25,7 +25,7 @@ import { ParsedAsset } from '@/resources/assets/types'; import { ExtendedAnimatedAssetWithColors } from '@/__swaps__/types/assets'; import { Screens, TimeToSignOperation, performanceTracking } from '@/state/performance/performance'; import { swapsStore } from '@/state/swaps/swapsStore'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; const getCrosschainSwapDefaultGasLimit = (quote: CrosschainQuote) => quote?.routes?.[0]?.userTxs?.[0]?.gasFees?.gasLimit; diff --git a/src/raps/actions/swap.ts b/src/raps/actions/swap.ts index 123bc5a0075..f3486d63aa9 100644 --- a/src/raps/actions/swap.ts +++ b/src/raps/actions/swap.ts @@ -48,7 +48,7 @@ import { ParsedAsset } from '@/resources/assets/types'; import { ExtendedAnimatedAssetWithColors } from '@/__swaps__/types/assets'; import { Screens, TimeToSignOperation, performanceTracking } from '@/state/performance/performance'; import { swapsStore } from '@/state/swaps/swapsStore'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; const WRAP_GAS_PADDING = 1.002; diff --git a/src/raps/actions/unlock.ts b/src/raps/actions/unlock.ts index 2d49f0711b3..adf9eddcf06 100644 --- a/src/raps/actions/unlock.ts +++ b/src/raps/actions/unlock.ts @@ -21,7 +21,7 @@ import { overrideWithFastSpeedIfNeeded } from './../utils'; import { toHex } from '@/__swaps__/utils/hex'; import { TokenColors } from '@/graphql/__generated__/metadata'; import { ParsedAsset } from '@/resources/assets/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; export const getAssetRawAllowance = async ({ owner, diff --git a/src/redux/gas.ts b/src/redux/gas.ts index 3ed07a0b85b..80a9c2f8384 100644 --- a/src/redux/gas.ts +++ b/src/redux/gas.ts @@ -37,7 +37,7 @@ import { ethUnits } from '@/references'; import { ethereumUtils, gasUtils } from '@/utils'; import { ChainId } from '@/chains/types'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; -import { chainsSwapPollingInterval, meteorologySupportedChainIds, needsL1SecurityFeeChains } from '@/chains/chains'; +import { chainsSwapPollingInterval, meteorologySupportedChainIds, needsL1SecurityFeeChains } from '@/chains'; import { MeteorologyLegacyResponse, MeteorologyResponse } from '@/entities/gas'; const { CUSTOM, FAST, NORMAL, SLOW, URGENT, FLASHBOTS_MIN_TIP } = gasUtils; diff --git a/src/redux/walletconnect.ts b/src/redux/walletconnect.ts index 3fcd4f17399..385e9f5d502 100644 --- a/src/redux/walletconnect.ts +++ b/src/redux/walletconnect.ts @@ -33,7 +33,7 @@ import { Verify } from '@walletconnect/types'; import { RequestSource, handleWalletConnectRequest } from '@/utils/requestNavigationHandlers'; import { ChainId } from '@/chains/types'; import { Address } from 'viem'; -import { supportedWalletConnectChainIds } from '@/chains/chains'; +import { supportedWalletConnectChainIds } from '@/chains'; // -- Variables --------------------------------------- // let showRedirectSheetThreshold = 300; diff --git a/src/resources/assets/UserAssetsQuery.ts b/src/resources/assets/UserAssetsQuery.ts index b6e84daa416..fffb9c491ad 100644 --- a/src/resources/assets/UserAssetsQuery.ts +++ b/src/resources/assets/UserAssetsQuery.ts @@ -11,7 +11,7 @@ import { fetchHardhatBalances } from './hardhatAssets'; import { AddysAccountAssetsMeta, AddysAccountAssetsResponse, RainbowAddressAssets } from './types'; import { Network } from '@/chains/types'; import { staleBalancesStore } from '@/state/staleBalances'; -import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; // /////////////////////////////////////////////// // Query Types diff --git a/src/resources/assets/assets.ts b/src/resources/assets/assets.ts index 7c02e0a2b0d..dba2a8678ff 100644 --- a/src/resources/assets/assets.ts +++ b/src/resources/assets/assets.ts @@ -13,7 +13,7 @@ import { RainbowPositions } from '@/resources/defi/types'; import { AddysAddressAsset, AddysAsset, ParsedAsset, RainbowAddressAssets } from './types'; import { getUniqueId } from '@/utils/ethereumUtils'; import { ChainId } from '@/chains/types'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const storage = new MMKV(); diff --git a/src/resources/assets/useUserAsset.ts b/src/resources/assets/useUserAsset.ts index 8ce89115a14..e6033701e58 100644 --- a/src/resources/assets/useUserAsset.ts +++ b/src/resources/assets/useUserAsset.ts @@ -4,7 +4,7 @@ import { useUserAssets } from '@/resources/assets/UserAssetsQuery'; import { selectUserAssetWithUniqueId } from '@/resources/assets/assetSelectors'; import { getUniqueId } from '@/utils/ethereumUtils'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; -import { chainsNativeAsset } from '@/chains/chains'; +import { chainsNativeAsset } from '@/chains'; export function useUserAsset(uniqueId: string) { const { accountAddress, nativeCurrency } = useAccountSettings(); diff --git a/src/resources/defi/PositionsQuery.ts b/src/resources/defi/PositionsQuery.ts index dbe45288812..46e935d00ed 100644 --- a/src/resources/defi/PositionsQuery.ts +++ b/src/resources/defi/PositionsQuery.ts @@ -7,7 +7,7 @@ import { rainbowFetch } from '@/rainbow-fetch'; import { ADDYS_API_KEY } from 'react-native-dotenv'; import { AddysPositionsResponse, PositionsArgs } from './types'; import { parsePositions } from './utils'; -import { SUPPORTED_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_CHAIN_IDS } from '@/chains'; export const buildPositionsUrl = (address: string) => { const networkString = SUPPORTED_CHAIN_IDS.join(','); diff --git a/src/resources/defi/utils.ts b/src/resources/defi/utils.ts index 7349996983d..436d7a20f6e 100644 --- a/src/resources/defi/utils.ts +++ b/src/resources/defi/utils.ts @@ -17,7 +17,7 @@ import { import { add, convertAmountToNativeDisplay, convertRawAmountToNativeDisplay, subtract } from '@/helpers/utilities'; import { maybeSignUri } from '@/handlers/imgix'; import { ethereumUtils } from '@/utils'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; export const parsePosition = (position: Position, currency: NativeCurrencyKey): RainbowPosition => { let totalDeposits = '0'; diff --git a/src/resources/favorites.ts b/src/resources/favorites.ts index ebea3551be5..e64e758be4b 100644 --- a/src/resources/favorites.ts +++ b/src/resources/favorites.ts @@ -8,7 +8,7 @@ import { promiseUtils } from '@/utils'; import { useQuery } from '@tanstack/react-query'; import { omit } from 'lodash'; import { externalTokenQueryKey, fetchExternalToken } from './assets/externalAssetsQuery'; -import { chainsIdByName, chainsName } from '@/chains/chains'; +import { chainsIdByName, chainsName } from '@/chains'; export const favoritesQueryKey = createQueryKey('favorites', {}, { persisterVersion: 4 }); diff --git a/src/resources/nfts/simplehash/index.ts b/src/resources/nfts/simplehash/index.ts index 21a7fb9608a..83ffac0574b 100644 --- a/src/resources/nfts/simplehash/index.ts +++ b/src/resources/nfts/simplehash/index.ts @@ -4,7 +4,7 @@ import { SimpleHashListing, SimpleHashNFT, SimpleHashMarketplaceId } from '@/res import { UniqueAsset } from '@/entities'; import { RainbowError, logger } from '@/logger'; import { ChainId } from '@/chains/types'; -import { chainsSimplehashNetwork } from '@/chains/chains'; +import { chainsSimplehashNetwork } from '@/chains'; export const START_CURSOR = 'start'; diff --git a/src/resources/nfts/simplehash/utils.ts b/src/resources/nfts/simplehash/utils.ts index b58c8c43e6e..ab3c0fc3f56 100644 --- a/src/resources/nfts/simplehash/utils.ts +++ b/src/resources/nfts/simplehash/utils.ts @@ -21,7 +21,7 @@ import { TokenStandard } from '@/handlers/web3'; import { handleNFTImages } from '@/utils/handleNFTImages'; import { SimpleHashNft } from '@/graphql/__generated__/arc'; import { Network } from '@/chains/types'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const ENS_COLLECTION_NAME = 'ENS'; const SVG_MIME_TYPE = 'image/svg+xml'; diff --git a/src/resources/transactions/consolidatedTransactions.ts b/src/resources/transactions/consolidatedTransactions.ts index 467e681aa70..7801e8e9d88 100644 --- a/src/resources/transactions/consolidatedTransactions.ts +++ b/src/resources/transactions/consolidatedTransactions.ts @@ -6,7 +6,7 @@ import { RainbowError, logger } from '@/logger'; import { rainbowFetch } from '@/rainbow-fetch'; import { ADDYS_API_KEY } from 'react-native-dotenv'; import { parseTransaction } from '@/parsers/transactions'; -import { chainsIdByName, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { chainsIdByName, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; const CONSOLIDATED_TRANSACTIONS_INTERVAL = 30000; const CONSOLIDATED_TRANSACTIONS_TIMEOUT = 20000; diff --git a/src/resources/transactions/transaction.ts b/src/resources/transactions/transaction.ts index 4ccfae0933d..d8f181084a8 100644 --- a/src/resources/transactions/transaction.ts +++ b/src/resources/transactions/transaction.ts @@ -9,7 +9,7 @@ import { parseTransaction } from '@/parsers/transactions'; import { RainbowError, logger } from '@/logger'; import { TransactionApiResponse } from './types'; import { ChainId } from '@/chains/types'; -import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; export type ConsolidatedTransactionsResult = QueryFunctionResult; export type PaginatedTransactions = { pages: ConsolidatedTransactionsResult[] }; diff --git a/src/screens/CurrencySelectModal.tsx b/src/screens/CurrencySelectModal.tsx index f0b5ec321e6..bca7126d7b0 100644 --- a/src/screens/CurrencySelectModal.tsx +++ b/src/screens/CurrencySelectModal.tsx @@ -40,7 +40,7 @@ import DiscoverSearchInput from '@/components/discover/DiscoverSearchInput'; import { externalTokenQueryKey, fetchExternalToken } from '@/resources/assets/externalAssetsQuery'; import { queryClient } from '@/react-query/queryClient'; import { ChainId, Network } from '@/chains/types'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; export interface EnrichedExchangeAsset extends SwappableAsset { ens: boolean; diff --git a/src/screens/ExchangeModal.tsx b/src/screens/ExchangeModal.tsx index 4fb3ab5ce87..7c46f4519b5 100644 --- a/src/screens/ExchangeModal.tsx +++ b/src/screens/ExchangeModal.tsx @@ -74,7 +74,7 @@ import { TokenColors } from '@/graphql/__generated__/metadata'; import { estimateSwapGasLimit } from '@/raps/actions'; import { estimateCrosschainSwapGasLimit } from '@/raps/actions/crosschainSwap'; import { parseGasParamAmounts } from '@/parsers'; -import { chainsName, needsL1SecurityFeeChains, shouldDefaultToFastGasChainIds, supportedFlashbotsChainIds } from '@/chains/chains'; +import { chainsName, needsL1SecurityFeeChains, shouldDefaultToFastGasChainIds, supportedFlashbotsChainIds } from '@/chains'; export const DEFAULT_SLIPPAGE_BIPS = { [ChainId.mainnet]: 100, diff --git a/src/screens/ExplainSheet.js b/src/screens/ExplainSheet.js index d835d27c1b8..ae1cb09720f 100644 --- a/src/screens/ExplainSheet.js +++ b/src/screens/ExplainSheet.js @@ -24,7 +24,7 @@ import * as i18n from '@/languages'; import { EthCoinIcon } from '@/components/coin-icon/EthCoinIcon'; import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; import { ChainId } from '@/chains/types'; -import { chainsLabel, chainsName } from '@/chains/chains'; +import { chainsLabel, chainsName } from '@/chains'; const { GAS_TRENDS } = gasUtils; export const ExplainSheetHeight = android ? 454 : 434; diff --git a/src/screens/MintsSheet/card/Card.tsx b/src/screens/MintsSheet/card/Card.tsx index 58c7a88868d..c0317d7fc0f 100644 --- a/src/screens/MintsSheet/card/Card.tsx +++ b/src/screens/MintsSheet/card/Card.tsx @@ -13,7 +13,7 @@ import ChainBadge from '@/components/coin-icon/ChainBadge'; import { navigateToMintCollection } from '@/resources/reservoir/mints'; import { EthCoinIcon } from '@/components/coin-icon/EthCoinIcon'; import { ChainId } from '@/chains/types'; -import { chainsNativeAsset } from '@/chains/chains'; +import { chainsNativeAsset } from '@/chains'; export const NUM_NFTS = 3; diff --git a/src/screens/NFTOffersSheet/OfferRow.tsx b/src/screens/NFTOffersSheet/OfferRow.tsx index ffb733e8c01..9707e780a89 100644 --- a/src/screens/NFTOffersSheet/OfferRow.tsx +++ b/src/screens/NFTOffersSheet/OfferRow.tsx @@ -18,7 +18,7 @@ import { Network } from '@/chains/types'; import { useAccountSettings } from '@/hooks'; import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; import { AddressOrEth } from '@/__swaps__/types/assets'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; const NFT_SIZE = 50; const MARKETPLACE_ORB_SIZE = 18; diff --git a/src/screens/NFTSingleOfferSheet/index.tsx b/src/screens/NFTSingleOfferSheet/index.tsx index 6837465cdc3..0056eaf3062 100644 --- a/src/screens/NFTSingleOfferSheet/index.tsx +++ b/src/screens/NFTSingleOfferSheet/index.tsx @@ -52,7 +52,7 @@ import { getNextNonce } from '@/state/nonces'; import { metadataPOSTClient } from '@/graphql'; import { ethUnits } from '@/references'; import { Transaction } from '@/graphql/__generated__/metadataPOST'; -import { chainsIdByName, chainsNativeAsset, defaultChains, getChainDefaultRpc } from '@/chains/chains'; +import { chainsIdByName, chainsNativeAsset, defaultChains, getChainDefaultRpc } from '@/chains'; const NFT_IMAGE_HEIGHT = 160; const TWO_HOURS_MS = 2 * 60 * 60 * 1000; diff --git a/src/screens/SendConfirmationSheet.tsx b/src/screens/SendConfirmationSheet.tsx index 2a339b7bb5a..411434521cc 100644 --- a/src/screens/SendConfirmationSheet.tsx +++ b/src/screens/SendConfirmationSheet.tsx @@ -62,7 +62,7 @@ import { useConsolidatedTransactions } from '@/resources/transactions/consolidat import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; import { performanceTracking, TimeToSignOperation, Screens } from '@/state/performance/performance'; import { ChainId } from '@/chains/types'; -import { chainsLabel } from '@/chains/chains'; +import { chainsLabel } from '@/chains'; const Container = styled(Centered).attrs({ direction: 'column', diff --git a/src/screens/SendSheet.js b/src/screens/SendSheet.js index fa9d204146d..b0911ef86e8 100644 --- a/src/screens/SendSheet.js +++ b/src/screens/SendSheet.js @@ -63,7 +63,7 @@ import { usePersistentDominantColorFromImage } from '@/hooks/usePersistentDomina import { performanceTracking, Screens, TimeToSignOperation } from '@/state/performance/performance'; import { REGISTRATION_STEPS } from '@/helpers/ens'; import { ChainId } from '@/chains/types'; -import { chainsName, chainsNativeAsset, needsL1SecurityFeeChains } from '@/chains/chains'; +import { chainsName, chainsNativeAsset, needsL1SecurityFeeChains } from '@/chains'; const sheetHeight = deviceUtils.dimensions.height - (IS_ANDROID ? 30 : 10); const statusBarHeight = IS_IOS ? safeAreaInsetValues.top : StatusBar.currentHeight; diff --git a/src/screens/SettingsSheet/components/NetworkSection.tsx b/src/screens/SettingsSheet/components/NetworkSection.tsx index 30da608f1b4..492dcc1671e 100644 --- a/src/screens/SettingsSheet/components/NetworkSection.tsx +++ b/src/screens/SettingsSheet/components/NetworkSection.tsx @@ -9,7 +9,7 @@ import { Separator, Stack } from '@/design-system'; import { useAccountSettings, useInitializeAccountData, useLoadAccountData, useResetAccountState } from '@/hooks'; import { settingsUpdateNetwork } from '@/redux/settings'; import { ChainId } from '@/chains/types'; -import { defaultChains } from '@/chains/chains'; +import { defaultChains } from '@/chains'; import { isL2Chain } from '@/handlers/web3'; interface NetworkSectionProps { diff --git a/src/screens/SignTransactionSheet.tsx b/src/screens/SignTransactionSheet.tsx index 17f13f7e20f..ac537391d28 100644 --- a/src/screens/SignTransactionSheet.tsx +++ b/src/screens/SignTransactionSheet.tsx @@ -71,7 +71,7 @@ import { useNonceForDisplay } from '@/hooks/useNonceForDisplay'; import { useProviderSetup } from '@/hooks/useProviderSetup'; import { useTransactionSubmission } from '@/hooks/useSubmitTransaction'; import { useConfirmTransaction } from '@/hooks/useConfirmTransaction'; -import { chainsName, defaultChains } from '@/chains/chains'; +import { chainsName, defaultChains } from '@/chains'; type SignTransactionSheetParams = { transactionDetails: RequestData; diff --git a/src/screens/SpeedUpAndCancelSheet.js b/src/screens/SpeedUpAndCancelSheet.js index 7251866cb6f..00e6c71699a 100644 --- a/src/screens/SpeedUpAndCancelSheet.js +++ b/src/screens/SpeedUpAndCancelSheet.js @@ -30,7 +30,7 @@ import { gasUtils, safeAreaInsetValues } from '@/utils'; import * as i18n from '@/languages'; import { updateTransaction } from '@/state/pendingTransactions'; import { logger, RainbowError } from '@/logger'; -import { supportedFlashbotsChainIds } from '@/chains/chains'; +import { supportedFlashbotsChainIds } from '@/chains'; import { ChainId } from '@/chains/types'; const { CUSTOM, URGENT } = gasUtils; diff --git a/src/screens/WalletConnectApprovalSheet.js b/src/screens/WalletConnectApprovalSheet.js index 27b93b09921..b1054db903d 100644 --- a/src/screens/WalletConnectApprovalSheet.js +++ b/src/screens/WalletConnectApprovalSheet.js @@ -29,7 +29,7 @@ import { InfoAlert } from '@/components/info-alert/info-alert'; import { EthCoinIcon } from '@/components/coin-icon/EthCoinIcon'; import { findWalletWithAccount } from '@/helpers/findWalletWithAccount'; import { ChainId } from '@/chains/types'; -import { chainsLabel, chainsName, chainsNativeAsset, defaultChains, supportedWalletConnectChainIds } from '@/chains/chains'; +import { chainsLabel, chainsName, chainsNativeAsset, defaultChains, supportedWalletConnectChainIds } from '@/chains'; import { isL2Chain } from '@/handlers/web3'; const LoadingSpinner = styled(android ? Spinner : ActivityIndicator).attrs(({ theme: { colors } }) => ({ diff --git a/src/screens/discover/components/DiscoverSearch.js b/src/screens/discover/components/DiscoverSearch.js index ce7bba8b25e..3f596cabf86 100644 --- a/src/screens/discover/components/DiscoverSearch.js +++ b/src/screens/discover/components/DiscoverSearch.js @@ -23,7 +23,7 @@ import { getPoapAndOpenSheetWithQRHash, getPoapAndOpenSheetWithSecretWord } from import { navigateToMintCollection } from '@/resources/reservoir/mints'; import { TAB_BAR_HEIGHT } from '@/navigation/SwipeNavigator'; import { ChainId, Network } from '@/chains/types'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; export const SearchContainer = styled(Row)({ height: '100%', diff --git a/src/screens/mints/MintSheet.tsx b/src/screens/mints/MintSheet.tsx index e57e589a729..3d97ee5e44d 100644 --- a/src/screens/mints/MintSheet.tsx +++ b/src/screens/mints/MintSheet.tsx @@ -56,7 +56,7 @@ import { getNextNonce } from '@/state/nonces'; import { metadataPOSTClient } from '@/graphql'; import { Transaction } from '@/graphql/__generated__/metadataPOST'; import { ChainId } from '@/chains/types'; -import { chainsName, defaultChains, getChainDefaultRpc } from '@/chains/chains'; +import { chainsName, defaultChains, getChainDefaultRpc } from '@/chains'; const NFT_IMAGE_HEIGHT = 250; // inset * 2 -> 28 *2 diff --git a/src/screens/points/claim-flow/ClaimRewardsPanel.tsx b/src/screens/points/claim-flow/ClaimRewardsPanel.tsx index 7478d32009f..d39b3619b3c 100644 --- a/src/screens/points/claim-flow/ClaimRewardsPanel.tsx +++ b/src/screens/points/claim-flow/ClaimRewardsPanel.tsx @@ -34,7 +34,7 @@ import { useMeteorologySuggestions } from '@/__swaps__/utils/meteorology'; import { AnimatedSpinner } from '@/components/animations/AnimatedSpinner'; import { RainbowError, logger } from '@/logger'; import { RewardsActionButton } from '../components/RewardsActionButton'; -import { chainsLabel, chainsName } from '@/chains/chains'; +import { chainsLabel, chainsName } from '@/chains'; type ClaimStatus = 'idle' | 'claiming' | 'success' | PointsErrorType | 'error' | 'bridge-error'; type ClaimNetwork = '10' | '8453' | '7777777'; diff --git a/src/screens/positions/SubPositionListItem.tsx b/src/screens/positions/SubPositionListItem.tsx index 5bef6adaaf5..d4708f43517 100644 --- a/src/screens/positions/SubPositionListItem.tsx +++ b/src/screens/positions/SubPositionListItem.tsx @@ -10,7 +10,7 @@ import { NativeDisplay, PositionAsset } from '@/resources/defi/types'; import { useExternalToken } from '@/resources/assets/externalAssetsQuery'; import { useAccountSettings } from '@/hooks'; import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; type Props = { asset: PositionAsset; diff --git a/src/state/assets/userAssets.ts b/src/state/assets/userAssets.ts index 61910a76146..cbb46eb7820 100644 --- a/src/state/assets/userAssets.ts +++ b/src/state/assets/userAssets.ts @@ -6,8 +6,7 @@ import { ETH_ADDRESS, supportedNativeCurrencies } from '@/references'; import { createRainbowStore } from '@/state/internal/createRainbowStore'; import { swapsStore } from '@/state/swaps/swapsStore'; import { ChainId } from '@/chains/types'; -import { useConnectedToHardhatStore } from '../connectedToHardhat'; -import { SUPPORTED_CHAIN_IDS } from '@/chains/chains'; +import { SUPPORTED_CHAIN_IDS } from '@/chains'; const SEARCH_CACHE_MAX_ENTRIES = 50; diff --git a/src/state/nonces/index.ts b/src/state/nonces/index.ts index d160e21633f..fa0ae319441 100644 --- a/src/state/nonces/index.ts +++ b/src/state/nonces/index.ts @@ -2,7 +2,7 @@ import create from 'zustand'; import { createStore } from '../internal/createStore'; import { Network, ChainId } from '@/chains/types'; import { getProvider } from '@/handlers/web3'; -import { chainsIdByName } from '@/chains/chains'; +import { chainsIdByName } from '@/chains'; type NonceData = { currentNonce?: number; diff --git a/src/utils/ethereumUtils.ts b/src/utils/ethereumUtils.ts index 4de1767fc09..772f841ac7a 100644 --- a/src/utils/ethereumUtils.ts +++ b/src/utils/ethereumUtils.ts @@ -50,7 +50,7 @@ import { } from '@/resources/assets/externalAssetsQuery'; import { ChainId, Network } from '@/chains/types'; import { AddressOrEth } from '@/__swaps__/types/assets'; -import { chainsIdByName, chainsName, chainsNativeAsset, defaultChains, getChainGasUnits } from '@/chains/chains'; +import { chainsIdByName, chainsName, chainsNativeAsset, defaultChains, getChainGasUnits } from '@/chains'; import { useConnectedToHardhatStore } from '@/state/connectedToHardhat'; const getNetworkNativeAsset = ({ chainId }: { chainId: ChainId }) => { diff --git a/src/utils/getUrlForTrustIconFallback.ts b/src/utils/getUrlForTrustIconFallback.ts index b991858842b..c9757d3080d 100644 --- a/src/utils/getUrlForTrustIconFallback.ts +++ b/src/utils/getUrlForTrustIconFallback.ts @@ -1,6 +1,6 @@ import { ChainId } from '@/chains/types'; import { EthereumAddress } from '@/entities'; -import { chainsName } from '@/chains/chains'; +import { chainsName } from '@/chains'; export default function getUrlForTrustIconFallback(address: EthereumAddress, chainId: ChainId): string | null { if (!address) return null; diff --git a/src/utils/requestNavigationHandlers.ts b/src/utils/requestNavigationHandlers.ts index 0980ef6e158..e9eececaa38 100644 --- a/src/utils/requestNavigationHandlers.ts +++ b/src/utils/requestNavigationHandlers.ts @@ -34,7 +34,7 @@ import { toUtf8String } from '@ethersproject/strings'; import { BigNumber } from '@ethersproject/bignumber'; import { Address } from 'viem'; import { ChainId } from '@/chains/types'; -import { chainsName, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains/chains'; +import { chainsName, SUPPORTED_MAINNET_CHAIN_IDS } from '@/chains'; export enum RequestSource { WALLETCONNECT = 'walletconnect', diff --git a/src/walletConnect/index.tsx b/src/walletConnect/index.tsx index d8a5bf4c1dc..e85860bcbbc 100644 --- a/src/walletConnect/index.tsx +++ b/src/walletConnect/index.tsx @@ -45,7 +45,7 @@ import { handleWalletConnectRequest } from '@/utils/requestNavigationHandlers'; import { PerformanceMetrics } from '@/performance/tracking/types/PerformanceMetrics'; import { PerformanceTracking } from '@/performance/tracking'; import { ChainId } from '@/chains/types'; -import { supportedWalletConnectChainIds } from '@/chains/chains'; +import { supportedWalletConnectChainIds } from '@/chains'; const SUPPORTED_SESSION_EVENTS = ['chainChanged', 'accountsChanged'];