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

Only use InputValidation when formatting voting stake #4090

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

ripcurlx
Copy link
Contributor

As this is annoying me every time after voting I've added this no-priority fix.

@ripcurlx ripcurlx added the is:no-priority PR or issue marked with this label is not up for compensation right now label Mar 23, 2020
@@ -554,6 +555,7 @@ private void updateViews() {
if (optionalMyVote.isPresent()) {
MyVote myVote = optionalMyVote.get();
Coin stake = Coin.valueOf(myVote.getBlindVote().getStake());
stakeInputTextField.setValidator(new InputValidator());
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be set at line 676 instead of

        stakeInputTextField.setValidator(new BsqValidator(bsqFormatter));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No the validator there is fine. Just after submitting the vote the value entered is formatted with BSQ in the end which causes the original validator to fail. I think it is good that it is formatted with the code in this case so I didn't remove the formatting, but decided to adapt the validator.

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@sqrrm sqrrm merged commit 427d581 into bisq-network:master Mar 26, 2020
@ripcurlx ripcurlx added this to the v1.3.0 milestone Apr 1, 2020
@ripcurlx ripcurlx deleted the stake-validation-issue branch July 16, 2021 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:no-priority PR or issue marked with this label is not up for compensation right now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants