Commit 38947fe7 authored by Moody Salem's avatar Moody Salem

Remove trade errors about insufficient liquidity that only show up if there's...

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)
parent 31f72a54
......@@ -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] &&
......
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