From b4b7c1c90cca37b90413373e7804791d3de9079b Mon Sep 17 00:00:00 2001 From: Christopher Howard Date: Tue, 17 Sep 2024 16:54:41 -0400 Subject: [PATCH] Fix BX-1641 & BX-1642 (#1703) --- src/entries/popup/hooks/swap/useSwapQuote.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/entries/popup/hooks/swap/useSwapQuote.ts b/src/entries/popup/hooks/swap/useSwapQuote.ts index 27aba75225..23aa853c69 100644 --- a/src/entries/popup/hooks/swap/useSwapQuote.ts +++ b/src/entries/popup/hooks/swap/useSwapQuote.ts @@ -57,12 +57,12 @@ export const useSwapQuote = ({ ); const quotesParams: QuoteParams | undefined = useMemo(() => { - const paramsReady = - assetToSell && - assetToBuy && - (independentField === 'buyField' + const independentValue = + independentField === 'buyField' ? Number(assetToBuyValue) - : Number(assetToSellValue)); + : Number(assetToSellValue); + const paramsReady = + assetToSell && assetToBuy && typeof independentValue === 'number'; if (!paramsReady) return undefined; return {