Skip to content

Conversation

@Thegreenpiranha
Copy link

  • Add input validation in handleTopUpInputChange
  • Clamp values to minimum 1000 sats (matching UI min attribute)
  • Clamp values to maximum based on wallet balance limit
  • Prevents negative amounts from being set
  • Prevents values below minimum threshold (e.g., 1, 500, 999)
  • HTML min attribute alone doesn't prevent programmatic invalid values

Tested:

  • Negative values ( copy/paste -5000, because negative numbers weren't accepted ) → clamped to 1000
  • Zero (0) → clamped to 1000
  • Below minimum (500) → clamped to 1000
  • Valid amounts (25000) → accepted

- Add input validation in handleTopUpInputChange
- Clamp values to minimum 1000 sats (matching UI min attribute)
- Clamp values to maximum based on wallet balance limit
- Prevents negative amounts from being set
- Prevents values below minimum threshold (e.g., 1, 500, 999)
- HTML min attribute alone doesn't prevent programmatic invalid values

Tested:
- Negative values (-5000) → clamped to 1000 ✓
- Zero (0) → clamped to 1000 ✓
- Below minimum (500) → clamped to 1000 ✓
- Valid amounts (25000) → accepted ✓
@vercel
Copy link

vercel bot commented Nov 27, 2025

@Thegreenpiranha is attempting to deploy a commit to the The Daniel's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant