Commit 5a316535 authored by Moody Salem's avatar Moody Salem Committed by GitHub

fix: `#isTradeBetter` should check that output currencies are equal (#2177)

* fix: isTradeBetter should check that input/output are equal

* fix the fix
parent 26e334c7
......@@ -16,7 +16,7 @@ export function isTradeBetter(
if (
tradeA.tradeType !== tradeB.tradeType ||
!tradeA.inputAmount.currency.equals(tradeB.inputAmount.currency) ||
!tradeB.outputAmount.currency.equals(tradeB.outputAmount.currency)
!tradeA.outputAmount.currency.equals(tradeB.outputAmount.currency)
) {
throw new Error('Comparing incomparable trades')
}
......
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