[ECO Bounty] ioTube Decimal Limit & Formatting Error


Summary: The ioTube "Convert" page is failing to enforce decimal limits for the CCS/CCCS token pair. Instead of limiting the input to the token's standard decimals, the UI generates an excessive string of zeros and fails to truncate the value properly.

Steps to Reproduce:

  1. Open ioTube and select the Convert tab.

  2. Select CCS to CCCS.

  3. Enter a value (e.g., "

    0.00000000000000000000000000001

    ").

Expected Result:

  • The input field should honor the specific decimal limit for the token (e.g., if the limit is 6 or 18, it should not exceed that).

  • The value should be formatted as a standard number without a long string of leading or trailing redundant zeros.

  • The output field should show a clean, limited decimal value.

Actual Result:

  • No Decimal Limiting: The interface is displaying/allowing an excessive number of digits (roughly 18-20+ zeros appear in the screenshot).

  • UI Overflow: Because the decimal limit isn't being enforced, the number of digits is so long that it overflows the input box and creates a visual glitch (the leading ). in the bottom field).

  • Bad Formatting: The input is being treated as a raw integer or unformatted string rather than a fixed-point decimal.

Suggested Fix:

  • Enforce a maxLength or a decimalPlaces constraint on the input fields based on the specific token's metadata.

  • Use a formatting function (like toFixed() or a BigNumber formatter) to ensure the UI only displays the relevant number of decimals.

Wallet Address: io1tkw393kejmxwnd454twc6020sxcyvh5dxqmren

Device & Environment:

-Operating system: Android 13

-Device model: Redmi Note 10 Pro

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

New Issue

Date

21 days ago

Author

cryptotestnet

Subscribe to post

Get notified by email when there are changes.