Skip to main content

[Eco Bounty] Incorrect Error Message Shown After Clicking 'MAX' Button on Bridge

Summary:
When bridging assets on the IoTeX Bridge (bridge.iotex.io), clicking the MAX button fails to populate the input field with the maximum available balance (0.3498 IOTX, as per the screenshot) and instead incorrectly triggers a validation error message: "✗ Please enter a valid amount".

Impact:
This issue prevents the user from quickly initiating a maximum-amount transfer, disrupting the intended workflow of the bridge UI. The error message is misleading, as the input field is not being validated against the user's input, but rather against a failure to populate the maximum value correctly.

Classification:

  • Type: Functionality/User Interface Error

  • CWE: CWE-440 (Expected Behavior Violation)


3. Steps to Reproduce 👣

  1. Navigate to the IoTeX Bridge: https://bridge.iotex.io

  2. Ensure the connected wallet has a small, non-zero balance of IOTX (e.g., 0.3498 IOTX).

  3. Set the bridging pair (e.g., IoTeX Network to Polygon).

  4. Click the MAX button next to the amount input field.

Observed Result ❌:

  1. The amount input field remains at 0.

  2. The error message "✗ Please enter a valid amount" immediately appears below the input field.

Expected Result ✅:

  1. The amount input field should be populated with the maximum available balance, minus any necessary gas fees (e.g., 0.3498 or the true maximum spendable amount).

  2. No error message should appear.


4. Recommendation 🛠️

The MAX button logic should be debugged to ensure it correctly calculates the maximum available balance (taking into account network gas fees for the bridge transaction) and populates this value into the amount input field. The validation check should only be run after the field is correctly populated or on user input.




Wallet Address: io1tkw393kejmxwnd454twc6020sxcyvh5dxqmren

Device & Environment:

-Operating system: Windows 11 Pro

-Device model: A520MHP

Status: Completed1 comment

Log in to comment and vote

Comments1

  • Terry Xu

    Team•

    Jan 9

    The bridge requires sufficient balance for gas and relay fees. Since your balance is too low to cover the fees, this error is triggered.