improvement(swap): show better trade link if trade doesn't exist on one version

This commit is contained in:
Moody Salem 2020-08-27 13:25:25 -05:00
parent 85217452db
commit 1911f72536
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB

@ -167,6 +167,8 @@ export function isTradeBetter(
tradeB: Trade | undefined, tradeB: Trade | undefined,
minimumDelta: Percent = ZERO_PERCENT minimumDelta: Percent = ZERO_PERCENT
): boolean | undefined { ): boolean | undefined {
if (tradeA && !tradeB) return false
if (tradeB && !tradeA) return true
if (!tradeA || !tradeB) return undefined if (!tradeA || !tradeB) return undefined
if ( if (