Skip to content

"Half" and "Max" buttons for the swap amounts give wrong values. #59

Description

@BrewLee0x

Describe the bug
When on the swap page and swapping between USDC and SOL the buttons "half" and "max" incorrectly adjust value for the swap.

Ie. I have 11.388106 usdc in my wallet but when pressing "MAX" button the value that is put into the trade is 11 388 106 meaning 11 thousand, so using the button to adjust value is reading the balance of my wallet wrong ignoring the comma.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the swap page.
  2. Click on "max" or "half" button in the top right corner
  3. See error

Expected behavior
Adjusting the value of the trade accordingly to wallet balance.

Screenshots
Yes, 2 screenshots provided

Smartphone (please complete the following information, if applicable):

  • Device: [Samsung Fold 5]
  • OS: [Android]
  • Browser [Phantom wallet]
  • Version []
Image Image

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions