mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-22 07:44:33 +00:00
use fixed localization for parsing offer amounts
This commit is contained in:
parent
39bc54df73
commit
66770cc98f
1 changed files with 3 additions and 1 deletions
|
@ -31,6 +31,8 @@ import java.math.BigDecimal;
|
|||
import java.math.BigInteger;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.Locale;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static haveno.core.util.VolumeUtil.getAdjustedVolumeUnit;
|
||||
|
@ -104,7 +106,7 @@ public class CoinUtil {
|
|||
}
|
||||
|
||||
public static BigInteger getRoundedAmount4Decimals(BigInteger amount, Long maxTradeLimit) {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.####");
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.####", HavenoUtils.DECIMAL_FORMAT_SYMBOLS);
|
||||
double roundedXmrAmount = Double.parseDouble(decimalFormat.format(HavenoUtils.atomicUnitsToXmr(amount)));
|
||||
return HavenoUtils.xmrToAtomicUnits(roundedXmrAmount);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue