Skip to content

Commit

Permalink
Merge pull request #5960 from jmacxx/dispute_payout_calc_allow_fracti…
Browse files Browse the repository at this point in the history
…onal_percent

Enable fractional percentages in dispute payout calculation field
  • Loading branch information
ripcurlx authored Jan 10, 2022
2 parents 76da172 + 6b0fcf5 commit 3cd67ba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,.]", ""));
double percentPenalty = ParsingUtils.parsePercentStringToDouble(disputeResult.getPayoutAdjustmentPercent());
penalizedPortionOfTradeAmount = Coin.valueOf((long) (contract.getTradeAmount().getValue() * percentPenalty));
} catch (NumberFormatException | NullPointerException e) {
Expand Down

0 comments on commit 3cd67ba

Please sign in to comment.