Remove trade errors about insufficient liquidity that only show up if there's a route (best trade will not return a trade if there is insufficient liquidity)
This commit is contained in:
parent
31f72a541b
commit
38947fe760
@ -596,28 +596,6 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
|
||||
setIsValid(false)
|
||||
}
|
||||
|
||||
if (
|
||||
parsedAmounts[Field.INPUT] &&
|
||||
route &&
|
||||
JSBI.greaterThan(parsedAmounts[Field.INPUT].raw, route.pairs[0].reserveOf(tokens[Field.INPUT]).raw)
|
||||
) {
|
||||
setTradeError('Insufficient Liquidity')
|
||||
setIsValid(false)
|
||||
}
|
||||
|
||||
if (
|
||||
!ignoreOutput &&
|
||||
parsedAmounts[Field.OUTPUT] &&
|
||||
route &&
|
||||
JSBI.greaterThan(
|
||||
parsedAmounts[Field.OUTPUT].raw,
|
||||
route.pairs[route.pairs.length - 1].reserveOf(tokens[Field.OUTPUT]).raw
|
||||
)
|
||||
) {
|
||||
setTradeError('Insufficient Liquidity')
|
||||
setIsValid(false)
|
||||
}
|
||||
|
||||
if (
|
||||
userBalances[Field.INPUT] &&
|
||||
parsedAmounts[Field.INPUT] &&
|
||||
|
Loading…
Reference in New Issue
Block a user