Skip to content

Commit

Permalink
Updated useActiveWeb3React imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro committed Mar 4, 2022
1 parent 51fb0c5 commit 414056f
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/custom/api/gnosisProtocol/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useSWR from 'swr'

import { useActiveWeb3React } from 'hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { getOrders, OrderMetaData } from 'api/gnosisProtocol/api'
import { AMOUNT_OF_ORDERS_TO_FETCH } from 'constants/index'

Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/AccountDetails/Transaction/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react'

import { useActiveWeb3React } from 'hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { getEtherscanLink } from 'utils'
import { RowFixed } from 'components/Row'

Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/AccountDetails/TransactionMod.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CheckCircle, Triangle } from 'react-feather'
import styled from 'styled-components/macro'

import { useActiveWeb3React } from 'hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { useAllTransactions } from 'state/enhancedTransactions/hooks'
import { ExternalLink } from 'theme'
import { getEtherscanLink } from 'utils'
Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/ExplorerLink/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ExternalLink } from 'theme'
import { useActiveWeb3React } from '@src/hooks/web3'
import { useActiveWeb3React } from 'hooks/web3'
import { BlockExplorerLinkType, getExplorerLabel, getEtherscanLink } from 'utils'

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/Header/URLWarning/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useAnnouncementVisible, useCloseAnnouncement } from 'state/profile/hook
import { hashCode } from 'utils/misc'
import useFetchFile from 'hooks/useFetchFile'
import { Markdown } from 'components/Markdown'
import { useActiveWeb3React } from '@src/hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { ChainId } from '@uniswap/sdk'
import { isBarn } from 'utils/environments'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AutoColumn } from 'components/Column'
import CurrencyLogo from 'components/CurrencyLogo'
import ListLogo from 'components/ListLogo'
import { RowFixed } from 'components/Row'
import { useActiveWeb3React } from 'hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { transparentize } from 'polished'
import { AlertCircle } from 'react-feather'
import styled, { useTheme } from 'styled-components/macro'
Expand Down
3 changes: 2 additions & 1 deletion src/custom/hooks/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useMemo } from 'react'
import { Web3Provider } from '@ethersproject/providers'
import { useActiveWeb3React } from '@src/hooks/web3'
import { useActiveWeb3React } from 'hooks/web3'

export * from '@src/hooks/web3'

// TODO: I think this might not be really necessary, consider removing it
/**
* Provides a Web3Provider instance for active web3 connection, if any
* Contrary to `getNetworkLibrary` that returns it for the default chainId
Expand Down
2 changes: 1 addition & 1 deletion src/custom/hooks/useApproveCallback/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Currency, CurrencyAmount, MaxUint256, Percent } from '@uniswap/sdk-core'
import { useActiveWeb3React } from '@src/hooks/web3'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { Field } from '@src/state/swap/actions'
import { computeSlippageAdjustedAmounts } from 'utils/prices'
import { useMemo } from 'react'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { nanoid } from '@reduxjs/toolkit'
import { TokenList } from '@uniswap/token-lists'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import getTokenList from 'lib/hooks/useTokenList/fetchTokenList'
import resolveENSContentHash from 'lib/utils/resolveENSContentHash'
import { useCallback } from 'react'
import { useAppDispatch } from 'state/hooks'

import { getNetworkLibrary } from 'connectors'
import { fetchTokenList } from 'state/lists/actions'
import getTokenList from 'utils/getTokenList'
import resolveENSContentHash from 'utils/resolveENSContentHash'
import { useActiveWeb3React } from 'hooks/web3'

export function useFetchListCallback(): (listUrl: string, sendDispatch?: boolean) => Promise<TokenList> {
const { chainId, library } = useActiveWeb3React()
Expand Down
2 changes: 1 addition & 1 deletion src/custom/hooks/useGetGpPriceStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ms from 'ms.macro'
import { useState, useEffect, useCallback } from 'react'
import { DEFAULT_GP_PRICE_STRATEGY } from 'constants/index'
import { getPriceStrategy, PriceStrategy } from 'api/gnosisProtocol/api'
import { useActiveWeb3React } from 'hooks'
import { useActiveWeb3React } from 'hooks/web3'
import { supportedChainId } from 'utils/supportedChainId'
import { SupportedChainId } from 'constants/chains'

Expand Down
2 changes: 1 addition & 1 deletion src/custom/pages/Claim/ClaimSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ClaimStatus } from 'state/claim/actions'
import { AMOUNT_PRECISION } from 'constants/index'
import { useTokenBalance } from 'state/wallet/hooks'
import { V_COW } from 'constants/tokens'
import { useActiveWeb3React } from 'hooks'
import { useActiveWeb3React } from 'hooks/web3'
import { JSBI } from '@uniswap/sdk'

type ClaimSummaryProps = Pick<ClaimCommonTypes, 'hasClaims' | 'isClaimed'> & {
Expand Down
2 changes: 1 addition & 1 deletion src/custom/state/claim/updater.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useMemo } from 'react'
import { SupportedChainId } from 'constants/chains'
import { ClassifiedUserClaims, useClaimDispatchers, useClaimState, useClassifiedUserClaims } from './hooks'
import { useActiveWeb3React } from 'hooks'
import { useActiveWeb3React } from 'hooks/web3'
import { ClaimInfo } from 'state/claim/reducer'

export default function Updater() {
Expand Down
1 change: 1 addition & 0 deletions src/custom/state/lists/updater/updaterMod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getVersionUpgrade, minVersionBump, VersionUpgrade } from '@uniswap/token-lists'
import { supportedChainId } from 'utils/supportedChainId'
import { /* ARBITRUM_LIST, OPTIMISM_LIST, */ DEFAULT_NETWORK_FOR_LISTS, UNSUPPORTED_LIST_URLS } from 'constants/lists'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { useCallback, useEffect } from 'react'
import { useAppDispatch } from 'state/hooks'
import { useAllLists } from 'state/lists/hooks'
Expand Down

0 comments on commit 414056f

Please sign in to comment.