From fc258fdf5c78bf03d184f91a7da7bfd42d7055de Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Wed, 28 Apr 2021 13:34:22 -0500 Subject: [PATCH] don't throw if the trades are not comparable --- src/utils/isTradeBetter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/isTradeBetter.ts b/src/utils/isTradeBetter.ts index 748904bdab..7622f39184 100644 --- a/src/utils/isTradeBetter.ts +++ b/src/utils/isTradeBetter.ts @@ -18,7 +18,7 @@ export function isTradeBetter( !currencyEquals(tradeA.inputAmount.currency, tradeB.inputAmount.currency) || !currencyEquals(tradeB.outputAmount.currency, tradeB.outputAmount.currency) ) { - throw new Error('Trades are not comparable') + return false } if (minimumDelta.equalTo(ZERO_PERCENT)) {