From 4afe42ac63780611379894b7588129b1bbcc3609 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 12 Sep 2022 15:48:59 +0100 Subject: [PATCH] fix: reset insufficient gas check --- packages/widget/src/hooks/useGasSufficiency.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/widget/src/hooks/useGasSufficiency.ts b/packages/widget/src/hooks/useGasSufficiency.ts index 3186c3ed8..d288d5826 100644 --- a/packages/widget/src/hooks/useGasSufficiency.ts +++ b/packages/widget/src/hooks/useGasSufficiency.ts @@ -40,6 +40,7 @@ export const useGasSufficiency = (route?: Route) => { const checkInsufficientGas = useCallback(async () => { if (!account.isActive || !route || !fromAmount) { + setInsufficientGas(undefined); return; } @@ -82,6 +83,7 @@ export const useGasSufficiency = (route?: Route) => { ); if (!tokenBalances?.length) { + setInsufficientGas(undefined); return; }