Commit 1cbf6787 authored by Moody Salem's avatar Moody Salem

Remove pair that is no longer used from the exchange page

parent 38947fe7
...@@ -17,7 +17,6 @@ import { ROUTER_ADDRESS } from '../../constants' ...@@ -17,7 +17,6 @@ import { ROUTER_ADDRESS } from '../../constants'
import { useTokenAllowance } from '../../data/Allowances' import { useTokenAllowance } from '../../data/Allowances'
import { useAddressBalance, useAllBalances } from '../../contexts/Balances' import { useAddressBalance, useAllBalances } from '../../contexts/Balances'
import { useAddUserToken, useFetchTokenByAddress } from '../../state/user/hooks' import { useAddUserToken, useFetchTokenByAddress } from '../../state/user/hooks'
import { usePair } from '../../data/Reserves'
import { useAllTokens, useToken } from '../../contexts/Tokens' import { useAllTokens, useToken } from '../../contexts/Tokens'
import { useHasPendingApproval, useTransactionAdder } from '../../state/transactions/hooks' import { useHasPendingApproval, useTransactionAdder } from '../../state/transactions/hooks'
import { useTokenContract, useWeb3React } from '../../hooks' import { useTokenContract, useWeb3React } from '../../hooks'
...@@ -174,8 +173,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro ...@@ -174,8 +173,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
} }
} }
const pair = usePair(tokens[Field.INPUT], tokens[Field.OUTPUT])
const bestTradeExactIn = useTradeExactIn( const bestTradeExactIn = useTradeExactIn(
tradeType === TradeType.EXACT_INPUT ? parsedAmounts[independentField] : null, tradeType === TradeType.EXACT_INPUT ? parsedAmounts[independentField] : null,
tokens[Field.OUTPUT] tokens[Field.OUTPUT]
...@@ -973,7 +970,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro ...@@ -973,7 +970,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
atMax={atMaxAmountInput} atMax={atMaxAmountInput}
token={tokens[Field.INPUT]} token={tokens[Field.INPUT]}
onTokenSelection={address => _onTokenSelect(address)} onTokenSelection={address => _onTokenSelect(address)}
pair={pair}
hideBalance={true} hideBalance={true}
hideInput={true} hideInput={true}
showSendWithSwap={true} showSendWithSwap={true}
...@@ -1017,7 +1013,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro ...@@ -1017,7 +1013,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
value={formattedAmounts[Field.INPUT]} value={formattedAmounts[Field.INPUT]}
atMax={atMaxAmountInput} atMax={atMaxAmountInput}
token={tokens[Field.INPUT]} token={tokens[Field.INPUT]}
pair={pair}
advanced={advanced} advanced={advanced}
onUserInput={onUserInput} onUserInput={onUserInput}
onMax={() => { onMax={() => {
...@@ -1067,7 +1062,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro ...@@ -1067,7 +1062,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
atMax={atMaxAmountOutput} atMax={atMaxAmountOutput}
token={tokens[Field.OUTPUT]} token={tokens[Field.OUTPUT]}
onTokenSelection={address => onTokenSelection(Field.OUTPUT, address)} onTokenSelection={address => onTokenSelection(Field.OUTPUT, address)}
pair={pair}
advanced={advanced} advanced={advanced}
otherSelectedTokenAddress={tokens[Field.INPUT]?.address} otherSelectedTokenAddress={tokens[Field.INPUT]?.address}
inputId="swapOutputField" inputId="swapOutputField"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment