diff --git a/src/main/java/nl/andrewl/coyotecredit/ctl/dto/TradeableData.java b/src/main/java/nl/andrewl/coyotecredit/ctl/dto/TradeableData.java index 1be60ca..0db9180 100644 --- a/src/main/java/nl/andrewl/coyotecredit/ctl/dto/TradeableData.java +++ b/src/main/java/nl/andrewl/coyotecredit/ctl/dto/TradeableData.java @@ -16,7 +16,7 @@ public record TradeableData( Long exchangeId, String exchangeName ) { - public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.00"); + public static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.0000"); public TradeableData(Tradeable t) { this( diff --git a/src/main/java/nl/andrewl/coyotecredit/service/AccountService.java b/src/main/java/nl/andrewl/coyotecredit/service/AccountService.java index b7d2ada..8563a75 100644 --- a/src/main/java/nl/andrewl/coyotecredit/service/AccountService.java +++ b/src/main/java/nl/andrewl/coyotecredit/service/AccountService.java @@ -138,7 +138,7 @@ public class AccountService { b.getTradeable().getType().name(), b.getAmount().toPlainString() )) - .sorted(Comparator.comparing(BalanceData::amount).thenComparing(BalanceData::symbol)) + .sorted(Comparator.comparing(BalanceData::amount).reversed().thenComparing(BalanceData::symbol)) .toList(), TradeableData.DECIMAL_FORMAT.format(account.getTotalBalance()), transactionData