From e2a44731d454ee4be1475583b47478808c61f00e Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 18 Jul 2022 14:54:00 +0100 Subject: [PATCH] fix: don't show routes with 0 fromAmount --- packages/widget/src/hooks/useSwapRoutes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/widget/src/hooks/useSwapRoutes.ts b/packages/widget/src/hooks/useSwapRoutes.ts index 3af8a1658..1ae1cdea3 100644 --- a/packages/widget/src/hooks/useSwapRoutes.ts +++ b/packages/widget/src/hooks/useSwapRoutes.ts @@ -37,8 +37,8 @@ export const useSwapRoutes = () => { !isNaN(toChainId) && Boolean(fromTokenAddress) && Boolean(toTokenAddress) && - Boolean(fromTokenAmount) && !isNaN(fromTokenAmount) && + Number(fromTokenAmount) > 0 && !Number.isNaN(slippage); const queryKey = [ 'routes',