Remove pair that is no longer used from the exchange page

This commit is contained in:
Moody Salem 2020-05-13 13:37:06 -04:00
parent 38947fe760
commit 1cbf67872b
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB

@ -17,7 +17,6 @@ import { ROUTER_ADDRESS } from '../../constants'
import { useTokenAllowance } from '../../data/Allowances'
import { useAddressBalance, useAllBalances } from '../../contexts/Balances'
import { useAddUserToken, useFetchTokenByAddress } from '../../state/user/hooks'
import { usePair } from '../../data/Reserves'
import { useAllTokens, useToken } from '../../contexts/Tokens'
import { useHasPendingApproval, useTransactionAdder } from '../../state/transactions/hooks'
import { useTokenContract, useWeb3React } from '../../hooks'
@ -174,8 +173,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
}
}
const pair = usePair(tokens[Field.INPUT], tokens[Field.OUTPUT])
const bestTradeExactIn = useTradeExactIn(
tradeType === TradeType.EXACT_INPUT ? parsedAmounts[independentField] : null,
tokens[Field.OUTPUT]
@ -973,7 +970,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
atMax={atMaxAmountInput}
token={tokens[Field.INPUT]}
onTokenSelection={address => _onTokenSelect(address)}
pair={pair}
hideBalance={true}
hideInput={true}
showSendWithSwap={true}
@ -1017,7 +1013,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
value={formattedAmounts[Field.INPUT]}
atMax={atMaxAmountInput}
token={tokens[Field.INPUT]}
pair={pair}
advanced={advanced}
onUserInput={onUserInput}
onMax={() => {
@ -1067,7 +1062,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
atMax={atMaxAmountOutput}
token={tokens[Field.OUTPUT]}
onTokenSelection={address => onTokenSelection(Field.OUTPUT, address)}
pair={pair}
advanced={advanced}
otherSelectedTokenAddress={tokens[Field.INPUT]?.address}
inputId="swapOutputField"