Fixed sorting and currency display.
This commit is contained in:
		
							parent
							
								
									b53a254a1c
								
							
						
					
					
						commit
						76af19b903
					
				| 
						 | 
				
			
			@ -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(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue