Skip to content

Commit

Permalink
fix total amounts in spread view
Browse files Browse the repository at this point in the history
  • Loading branch information
woodser committed May 15, 2024
1 parent 113a94b commit 64acf86
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,13 @@ private void update(ObservableList<OfferBookListItem> offerBookListItems) {
}
}

for (Offer offer : offers) totalAmount = totalAmount.add(offer.getAmount());
BigInteger totalAmountForCurrency = BigInteger.ZERO;
for (Offer offer : offers) {
totalAmount = totalAmount.add(offer.getAmount());
totalAmountForCurrency = totalAmountForCurrency.add(offer.getAmount());
}
spreadItems.add(new SpreadItem(key, buyOffers.size(), sellOffers.size(),
uniqueOffers.size(), spread, percentage, percentageValue, totalAmount));
uniqueOffers.size(), spread, percentage, percentageValue, totalAmountForCurrency));
}

maxPlacesForAmount.set(formatAmount(totalAmount, false).length());
Expand Down

0 comments on commit 64acf86

Please sign in to comment.