
Description: In the "Buy" tab of the Mimo Exchange interface, the input field labeled "How much IOTX you want to buy" lacks proper input type restriction or regex validation. Users are able to type alphabetic characters (e.g., "AQW") into a field that should strictly accept only positive numeric values (integers or decimals). This results in a broken calculation state where the "You Pay" section displays ellipses ("...") instead of a calculated amount, and could potentially lead to failed transaction submissions or parsing errors.
Steps to Reproduce:
Navigate to mimo.exchange on a mobile device.
Ensure wallet is not connected (or connected, the bug appears in both states).
Click on the Buy tab.
Tap into the input field asking "How much IOTX you want to buy".
Type alphabetic characters (e.g., "AQW", "ABC", or "Test").
Observe that the input is accepted without error.
Actual Result:
The field displays "AQW" (or any typed letters).
No inline validation error appears.
The "You Pay" calculation section breaks, showing "..." instead of an equivalent ETH amount.
The interface remains in a confusing intermediate state.
Expected Result:
The input field should reject non-numeric keystrokes immediately.
Alternatively, upon entering invalid characters, an inline error message should appear: "Please enter a valid number".
The field should use type="number" or inputmode="decimal" to trigger the numeric keypad on mobile devices instead of the full QWERTY keyboard.
Impact:
User Confusion: Users may not realize they entered invalid data until they attempt to proceed, leading to frustration.
Transaction Risk: If frontend validation is missing, backend parsing might fail silently or throw cryptic errors during the transaction signing process.
Mobile UX: Failing to restrict the keyboard to numeric input forces users to manually switch keyboard layouts, increasing friction.
Calculation Errors: The broken "You Pay" display prevents users from understanding the exchange rate or total cost.
Suggested Fix:
Input Type Restriction: Change the HTML input element to type="number" or add inputmode="decimal" to force the numeric keypad on mobile devices.
Regex Validation: Implement real-time JavaScript validation using a regex pattern (e.g., ^\d*\.?\d*$) to strip or block alphabetic characters as they are typed.
Error Messaging: Add a red border and tooltip/error text below the field when invalid input is detected (e.g., "Invalid amount. Please enter numbers only.").
Sanitization: Ensure the input is sanitized before any price calculation API calls are made to prevent sending garbage data to the quote endpoint.
Wallet Address: io1tkw393kejmxwnd454twc6020sxcyvh5dxqmren
Device & Environment:
-Operating system: Android 13
-Device model: Redmi Note 10 Pro
Please authenticate to join the conversation.
In Review
New Issue
About 2 hours ago

cryptotestnet
Get notified by email when there are changes.
In Review
New Issue
About 2 hours ago

cryptotestnet
Get notified by email when there are changes.