Skip to content

Commit

Permalink
fix bugs after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
karczuRF committed Dec 9, 2022
1 parent 3cdd4f7 commit 5a66c66
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@web3-react/network": "8.0.27-beta.0",
"@web3-react/types": "8.0.20-beta.0",
"@web3-react/url": "8.0.25-beta.0",
"@web3-react/walletconnect": "8.0.35-beta.0",
"@web3-react/walletconnect": "8.0.36-beta.0",
"@uniswap/v3-periphery": "1.4.1",
"ajv": "^8.11.0",
"ajv-formats": "^2.1.1",
Expand Down
1 change: 0 additions & 1 deletion src/constants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { ReactNode } from 'react'

import BaoswapLogo from '../assets/images/baoswap-logo.png'
import PancakeSwapLogo from '../assets/images/bunny-mono.png'
import Coinbase from '../assets/images/coinbase.svg'
import CoWLogo from '../assets/images/cow-protocol.svg'
import CurveLogo from '../assets/images/curve-logo.png'
import DFYNLogo from '../assets/images/dfyn-logo.svg'
Expand Down
5 changes: 2 additions & 3 deletions src/hooks/usePairTokenPriceByTimestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
TIMEFRAME_PROPRETIES,
} from '../components/Charts/chartUtils'
import { wrappedCurrency } from '../utils/wrappedCurrency'

import { useActiveWeb3React } from '.'
import { useWeb3ReactCore } from './useWeb3ReactCore'

const GET_PAIR_TOKEN_PRICES_QUERY = gql`
query getPairTokenPrices($pairAddress: ID, $timestamp: BigInt, $timeframe: PairTokenPriceTimeframe) {
Expand Down Expand Up @@ -48,7 +47,7 @@ type PairTokenPriceByTimestampProps = {
}

export function usePairTokenPriceByTimestamp({ currency0, currency1, dateInterval }: PairTokenPriceByTimestampProps) {
const { chainId } = useActiveWeb3React()
const { chainId } = useWeb3ReactCore()
const [wrappedToken1, setWrappedToken1] = useState<Token>()
const [pairAddress, setPairAddress] = useState<string>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ExternalLink } from 'react-feather'
import { Text } from 'rebass'
import styled, { useTheme } from 'styled-components'

import { useActiveWeb3React } from '../../../../../hooks/index'
import { useWeb3ReactCore } from '../../../../../hooks/useWeb3ReactCore'
import { EXPLORER_LINK_TYPE, getExplorerLink } from '../../../../../utils'
import { Status } from '../../../../Account/Account.styles'
import { Transaction, TransactionTypes } from '../../../../Account/Account.types'
Expand All @@ -30,7 +30,7 @@ const Wrapper = styled.div`
`

export const OrderHistoryTransaction = ({ tx }: { tx: Transaction }) => {
const { chainId } = useActiveWeb3React()
const { chainId } = useWeb3ReactCore()
const theme = useTheme()

const isSwapTransaction = tx.type === TransactionTypes.Swap
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Swap/Swapbox/Swapbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import ConfirmSwapModal from '../../../components/Swap/ConfirmSwapModal'
import { ArrowWrapper, SwitchTokensAmountsContainer, Wrapper } from '../../../components/Swap/styleds'
import SwapButtons from '../../../components/Swap/SwapButtons'
import { TradeDetails } from '../../../components/Swap/TradeDetails'
import { useActiveWeb3React } from '../../../hooks'
import { ApprovalState, useApproveCallbackFromTrade } from '../../../hooks/useApproveCallback'
import { useSwapCallback } from '../../../hooks/useSwapCallback'
import { useHigherUSDValue } from '../../../hooks/useUSDValue'
import { useWeb3ReactCore } from '../../../hooks/useWeb3ReactCore'
import { useWrapCallback, WrapState, WrapType } from '../../../hooks/useWrapCallback'
import { useDerivedSwapInfo, useSwapActionHandlers, useSwapState } from '../../../state/swap/hooks'
import { Field } from '../../../state/swap/types'
Expand Down Expand Up @@ -44,7 +44,7 @@ export function Swapbox() {
const [platformOverride, setPlatformOverride] = useState<RoutablePlatform | null>(null)
const [showAdvancedSwapDetails, setShowAdvancedSwapDetails] = useAdvancedSwapDetails()

const { chainId } = useActiveWeb3React()
const { chainId } = useWeb3ReactCore()

// for expert mode
const isExpertMode = useIsExpertMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { ChainId, Currency, Token, WETH, WMATIC, WXDAI } from '@swapr/sdk'
import { useEffect, useMemo, useRef, useState } from 'react'
import { useDispatch } from 'react-redux'

import { useActiveWeb3React } from '../../hooks'
import { useToken } from '../../hooks/Tokens'
import { useRouter } from '../../hooks/useRouter'
import { useWeb3ReactCore } from '../../hooks/useWeb3ReactCore'
import store, { AppState } from '../../state'
import { useSwapState } from '../../state/swap/hooks'
import { adapters } from './adapters/adapters.config'
Expand Down Expand Up @@ -44,7 +44,7 @@ const calculateAmountToFetch = (chainId: ChainId | undefined, amountToFetch: num
}

export const useAdvancedTradingView = () => {
const { chainId } = useActiveWeb3React()
const { chainId } = useWeb3ReactCore()

const { navigate } = useRouter()

Expand Down
4 changes: 2 additions & 2 deletions src/services/AdvancedTradingView/useAllTrades.hook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo } from 'react'
import { useSelector } from 'react-redux'

import { useActiveWeb3React } from '../../hooks'
import { useWeb3ReactCore } from '../../hooks/useWeb3ReactCore'
import { Transaction, TransactionStatus } from '../../pages/Account/Account.types'
import { formattedTransactions as formatTransactions } from '../../pages/Account/accountUtils'
import { useAllBridgeTransactions, useAllSwapTransactions } from '../../state/transactions/hooks'
Expand All @@ -19,7 +19,7 @@ export const useAllTrades = (): {
liquidityHistory: AdvancedViewTransaction[]
hasMore: { hasMoreActivity: boolean; hasMoreTrades: boolean }
} => {
const { account } = useActiveWeb3React()
const { account } = useWeb3ReactCore()
const hasMore = useSelector(selectHasMoreData)
const { uniswapV3LiquidityHistory, uniswapV3TradeHistory } = useSelector(selectUniswapV3AllData)
const { baseAdapterTradeHistory, baseAdapterLiquidityHistory } = useSelector(selectAllDataFromAdapters)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7192,10 +7192,10 @@
"@ethersproject/providers" "^5"
"@web3-react/types" "^8.0.20-beta.0"

"@web3-react/walletconnect@8.0.35-beta.0":
version "8.0.35-beta.0"
resolved "https://registry.yarnpkg.com/@web3-react/walletconnect/-/walletconnect-8.0.35-beta.0.tgz#49c6c77447d58bfb295f28fa87c8fbfeec95cff5"
integrity sha512-fUrqcnwAr5oecZ6VUE/7+RSVURrohbAgWMLKYxd8Zo47AtTPzgJ1t5Lydh/EX4xJPLhfK1LqX5YgMwiys3DvhQ==
"@web3-react/walletconnect@8.0.36-beta.0":
version "8.0.36-beta.0"
resolved "https://registry.yarnpkg.com/@web3-react/walletconnect/-/walletconnect-8.0.36-beta.0.tgz#a0dbb5286b9011c6c221cc143322822a7387978f"
integrity sha512-u+yNWCm8nz5pZn8SyU5+9pI5hakKcfhUF1TYwj7HVTTMHdMlLXhk19YyaycsFkgbX9zWzouItwxXF8obGt+rCg==
dependencies:
"@web3-react/types" "^8.0.20-beta.0"
eventemitter3 "^4.0.7"
Expand Down

0 comments on commit 5a66c66

Please sign in to comment.