Add null check

This commit is contained in:
Manfred Karrer 2016-05-16 21:32:42 +02:00
parent cfd2e837e9
commit e910233b4c

View File

@ -864,7 +864,6 @@ public class MainViewModel implements ViewModel {
private void updateLockedBalance() {
Coin sum = Coin.valueOf(tradeManager.getLockedTradeStream()
.mapToLong(trade -> {
//AddressEntry addressEntry = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.MULTI_SIG);
Coin lockedTradeAmount = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.MULTI_SIG).getLockedTradeAmount();
return lockedTradeAmount != null ? lockedTradeAmount.getValue() : 0;
})