Merge pull request #6045 from xyzmaker123/5634-fix-nullable-contract

Fix failed trades view when contract is null
This commit is contained in:
Christoph Atteneder 2022-02-17 10:38:29 +01:00 committed by GitHub
commit d8f66c0725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,6 +107,7 @@ class FailedTradesDataModel extends ActivatableDataModel {
}
private boolean isTradeWithSameCurrentNodeAddress(Trade trade) {
if (trade.getContract() == null) return false;
NodeAddress tradeNodeAddress = trade.getContract().getMyNodeAddress(keyRing.getPubKeyRing());
return Objects.equals(p2PService.getNetworkNode().getNodeAddress(), tradeNodeAddress);
}