Skip to content

Commit

Permalink
Merge branch 'hotfix/button-state' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Ho3einWave committed Nov 20, 2024
2 parents 21b6a2f + fee6152 commit b1da0a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/SwapButton/SwapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const SwapButton = () => {

const isButtonDisabled = () => {
if (!tonConnectInstance?.wallet) return false;
if (!pay_amount || !pay_token) return true;

if (!pay_amount || !receive_token) return true;
if (bestRoute && !bestRoute.pool_data.status) return true;
if (pay_amount > Number(balance.get(pay_token!.address)?.balance ?? 0))
return true;
Expand Down

0 comments on commit b1da0a6

Please sign in to comment.