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

Allow entering amounts over 10,000,000 btc #2138

Merged
merged 1 commit into from Aug 23, 2019

Conversation

@benthecarman
Copy link
Collaborator

commented Aug 21, 2019

If you do not have a . in the amount text, then dotIndex will be -1 so the substring will only allow you to have an amount of 9,999,999 (7 digits)

If this edge case every actually happens that person owes me 1 btc

@nopara73

This comment has been minimized.

Copy link
Collaborator

commented Aug 21, 2019

Code looks reasonable, but not sure of the issue. Can you elaborate a bit more before I dive into it?

@benthecarman

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 21, 2019

Basically, it works as expected when there is a '.' in the AmountText, however, when there is not a '.' in the AmountText, then it will cut the string to only 7 characters because dotIndex will be -1, therefore betterAmount.Substring(0, dotIndex + 1 + 8); will result to betterAmount.Substring(0, 8);

@lontivero
Copy link
Collaborator

left a comment

This PR looks okay. However, it is good to know that something smells off with this code because if I delete the 0.0 and I paste something like -,.a.03 and then click on a different textbox I see the Amount textbox keeps the cursor (it seems there is an uncaught exception somewhere). Moreover, one out the four times I tested this killed Wasabi.

I think the best plan of actions here is merge this PR and open a new issue for this. Are we okay?

@benthecarman

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 21, 2019

This PR looks okay. However, it is good to know that something smells off with this code because if I delete the 0.0 and I paste something like -,.a.03 and then click on a different textbox I see the Amount textbox keeps the cursor (it seems there is an uncaught exception somewhere). Moreover, one out the four times I tested this killed Wasabi.

I am unable to reproduce this on Windows and Linux

@nopara73 nopara73 merged commit fc02d3b into zkSNACKs:master Aug 23, 2019

4 checks passed

CodeFactor No issues found.
Details
Wasabi.Linux #20190821.3 succeeded
Details
Wasabi.Osx #20190821.3 succeeded
Details
Wasabi.Windows #20190821.3 succeeded
Details

@benthecarman benthecarman deleted the benthecarman:10000btcfix branch Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.