-
Notifications
You must be signed in to change notification settings - Fork 67
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
[GUI] Limit amount to 8 decimal digits #992
Conversation
not related to this PR: should we add |
Instead of using regex, another option might be to use |
I agree with @jp1ac4, let's not reinvent the wheel down here if they already have parsing upstream. |
i've done adviced changes, not yet tested because my crash issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are working well. Just had a couple of comments.
49bbb52
to
372a95c
Compare
adressed comments & squash |
Please remove the unused regex dep. Thanks |
b2ad9be
to
ed87fb6
Compare
oops, done & rebased on master |
ed87fb6
to
93aba57
Compare
5606bb9
to
9415dc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9415dc9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9415dc9
This PR replace #977 and fixes #798
I've followed jp1ac4 advice and create a
Form::new_amount_btc()
method that act likeForm::new_trimmed()
w/ few more (filtering) features:- allow only input of "0123456789,." characters- "," is replaced by "."- only one "." separator- maximum 8 digit after separatorthese features works for keyboard input or pastei've tryied to add a "0" in case the String start with a "." but this make the cursor have a bad location and i do not find a way to control the cursor location w/ iced, so i revert this feature