diff --git a/src/components/Swap/SwapActionButton/index.tsx b/src/components/Swap/SwapActionButton/index.tsx index ae0cf7314..874ce10de 100644 --- a/src/components/Swap/SwapActionButton/index.tsx +++ b/src/components/Swap/SwapActionButton/index.tsx @@ -28,8 +28,9 @@ export default function SwapActionButton() { (!permit2Enabled && approval.state !== SwapApprovalState.APPROVED) || error !== undefined || (!isWrap && !trade) || - !(inputCurrencyAmount && inputCurrencyBalance) || - inputCurrencyBalance.lessThan(inputCurrencyAmount), + !inputCurrencyAmount || + // If there is no balance loaded, we should default to isDisabled=false + Boolean(inputCurrencyBalance?.lessThan(inputCurrencyAmount)), [permit2Enabled, approval.state, error, isWrap, trade, inputCurrencyAmount, inputCurrencyBalance] ) diff --git a/src/hooks/useCurrencyBalance.ts b/src/hooks/useCurrencyBalance.ts index c06b8a2ce..244ea5d26 100644 --- a/src/hooks/useCurrencyBalance.ts +++ b/src/hooks/useCurrencyBalance.ts @@ -118,7 +118,6 @@ export function useCurrencyBalances( const tokenBalances = useTokenBalances(account, tokens) const containsETH: boolean = useMemo(() => currencies?.some((currency) => currency?.isNative) ?? false, [currencies]) const ethBalance = useNativeCurrencyBalances(useMemo(() => (containsETH ? [account] : []), [containsETH, account])) - return useMemo( () => currencies?.map((currency) => {