Skip to content

Commit

Permalink
Fix BX-1641 & BX-1642 (#1703)
Browse files Browse the repository at this point in the history
  • Loading branch information
derHowie authored Sep 17, 2024
1 parent f80d999 commit b4b7c1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/entries/popup/hooks/swap/useSwapQuote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b4b7c1c

Please sign in to comment.