Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VDG] CurrencyEntryBox - do not allow space #10875

Merged
merged 1 commit into from Jun 11, 2023

Conversation

soosr
Copy link
Collaborator

@soosr soosr commented Jun 10, 2023

fixes #10855

@soosr soosr requested a review from yahiheb June 10, 2023 15:13
Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@yahiheb
Copy link
Collaborator

yahiheb commented Jun 10, 2023

It is possible to paste this input 99999999.9999 9 9 9 9 (then it gets deleted automatically) while pasting any other invalid amount is not.

@soosr
Copy link
Collaborator Author

soosr commented Jun 11, 2023

It is possible to paste this input 99999999.9999 9 9 9 9 (then it gets deleted automatically) while pasting any other invalid amount is not.

I think there is a big problem with CurrencyEntryBox and with the way it processes the input. IMO it should always:

  • first, remove every formatting and invalid char
  • Validate the amount
  • Apply our format and display it in the field.

@soosr
Copy link
Collaborator Author

soosr commented Jun 11, 2023

I will take a look to do a tiny refactoring, draft until then.

@soosr soosr marked this pull request as draft June 11, 2023 08:41
@soosr
Copy link
Collaborator Author

soosr commented Jun 11, 2023

It is possible to paste this input 99999999.9999 9 9 9 9 (then it gets deleted automatically) while pasting any other invalid amount is not.

Can be reproduced on master. Merging this PR. And opening a separate issue for CurrencyEntryBox.

@soosr soosr marked this pull request as ready for review June 11, 2023 10:33
@soosr soosr merged commit 6fd6c23 into zkSNACKs:master Jun 11, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not accept space as a valid input from the user when typing the amount to send
2 participants