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

Enable fractional percentages in dispute payout calculation field #5960

Merged
merged 1 commit into from Jan 10, 2022
Merged

Enable fractional percentages in dispute payout calculation field #5960

merged 1 commit into from Jan 10, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jan 7, 2022

@leo816 requested the ability to enter fractional percentages in the dispute payout calculation window.
Either a comma (1,23) or a period (1.23) may be used as the fractional delimiter.

image

@@ -963,7 +963,7 @@ private void applyUiControlsToDisputeResult(Toggle selectedTradeAmountToggle) {

Coin penalizedPortionOfTradeAmount = Coin.ZERO;
try {
disputeResult.setPayoutAdjustmentPercent(compensationOrPenalty.getText().replaceAll("[^0-9]", ""));
disputeResult.setPayoutAdjustmentPercent(compensationOrPenalty.getText().replaceAll("[^0-9,.]", ""));
Copy link

Choose a reason for hiding this comment

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

What about changing type of payoutAdjustmentPercent to double instead of String, and handling this replaceAll logic inside ParsingUtils.parsePercentStringToDouble method?

Copy link
Author

Choose a reason for hiding this comment

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

@xyzmaker123 thankyou for the review. However I sincerely believe in this case that it would be better remaining as is.

@ripcurlx ripcurlx added this to the v1.8.1 milestone Jan 10, 2022
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx merged commit 3cd67ba into bisq-network:master Jan 10, 2022
@ghost ghost mentioned this pull request Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant