[bisq-network/bisq] Enable fractional percentages in dispute payout calculation field (PR #5960)

xyzmaker123 notifications at github.com
Sat Jan 8 12:52:36 CET 2022


@xyzmaker123 commented on this pull request.



> @@ -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,.]", ""));

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5960#pullrequestreview-847149181
You are receiving this because you are subscribed to this thread.

Message ID: <bisq-network/bisq/pull/5960/review/847149181 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20220108/a4e93003/attachment.htm>


More information about the bisq-github mailing list