Skip to content

Commit

Permalink
fix(apps/swap) only show insufficient balance if srcAmount is greater…
Browse files Browse the repository at this point in the history
… than zero
  • Loading branch information
chillichelli committed Jul 17, 2022
1 parent e6c0bed commit de1d4a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/swap/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,10 @@ const Widget: FC<Swap> = ({
<Button size="md" fullWidth disabled>
Insufficient liquidity for this trade.
</Button>
) : feeRef.current && nativeBalance && feeRef.current.greaterThan(nativeBalance[FundSource.WALLET]) ? (
) : srcAmount?.greaterThan(0) &&
feeRef.current &&
nativeBalance &&
feeRef.current.greaterThan(nativeBalance[FundSource.WALLET]) ? (
<Button size="md" fullWidth disabled>
Insufficient Balance
</Button>
Expand Down

0 comments on commit de1d4a3

Please sign in to comment.