Skip to content

Validate amount precision before parseUnits #4

Description

@oliv3rdrt

The amount input uses step="any", so a user can enter more fractional digits than USDC's 6 decimals. That is currently handed straight to parseUnits. Add a visible validation error when the entered amount has more decimal places than the token supports, instead of relying on downstream rounding.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions