Enable fractional percentages in dispute payout calculation field

This commit is contained in:
jmacxx 2022-01-07 11:36:25 -06:00
parent ce76389402
commit 6b0fcf5cfb
No known key found for this signature in database
GPG Key ID: 155297BABFE94A1B

View File

@ -963,7 +963,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
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) {