- "Should not happen: approved transaction has %d accounts for " +
- "currency %s", accounts.size(), currency));
- accounts.get(0)
- .setAmount(-Objects.requireNonNull(
- emptyAmountAccountBalance.get(currency)));
+ "Should not happen: approved transaction has %d accounts " +
+ "without amounts for currency '%s'", accounts.size(), currency));
+ }
+ accounts.forEach(acc -> acc.setAmount(balance == null ? 0 : -balance));