MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.18k stars 1.12k forks source link

feat: limit input digits to 12 in useInputHandler #12398

Closed amitabh94 closed 3 days ago

amitabh94 commented 3 days ago

Description

This pull request adds a maximum digit limit of 12 in the useInputHandler function. It ensures that the input value is restricted to 12 digits and prevents any further input beyond that limit. This enhancement improves the user experience by enforcing a consistent and manageable input length.

Related issues

Fixes: STAKE-877

Manual testing steps

  1. Go to Stake Input or Unstake Input page
  2. Try to enter more than 12 digits using keypad on the screen
  3. You should not be able to enter more than 12 digits

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

github-actions[bot] commented 3 days ago

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] commented 3 days ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: b59d33d977b9dabe2ee4f044ad3528bbd9548e81 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/59733a6e-a1bd-4fa2-be6c-64f2d105f16f

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
sonarcloud[bot] commented 3 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
56.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud