diff --git a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java index 3e5a948f64d..7fe43ecc7d2 100644 --- a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java +++ b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java @@ -65,6 +65,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Random; import java.util.concurrent.TimeUnit; @@ -616,6 +617,7 @@ public List getTraderPaymentAccounts(long safeDate, PaymentMetho .filter(this::hasChargebackRisk) .filter(this::isBuyerWinner) .flatMap(this::getTraderData) + .filter(Objects::nonNull) .filter(traderDataItem -> !signedWitnessService.isSignedAccountAgeWitness(traderDataItem.getAccountAgeWitness())) .filter(traderDataItem -> traderDataItem.getAccountAgeWitness().getDate() < safeDate) diff --git a/core/src/main/java/bisq/core/support/dispute/mediation/MediationDisputeList.java b/core/src/main/java/bisq/core/support/dispute/mediation/MediationDisputeList.java index 2b58f98d586..ce45e2fede5 100644 --- a/core/src/main/java/bisq/core/support/dispute/mediation/MediationDisputeList.java +++ b/core/src/main/java/bisq/core/support/dispute/mediation/MediationDisputeList.java @@ -18,7 +18,6 @@ package bisq.core.support.dispute.mediation; import bisq.core.proto.CoreProtoResolver; -import bisq.core.support.SupportType; import bisq.core.support.dispute.Dispute; import bisq.core.support.dispute.DisputeList; @@ -34,8 +33,6 @@ import lombok.ToString; import lombok.extern.slf4j.Slf4j; -import static com.google.common.base.Preconditions.checkArgument; - @Slf4j @ToString /* @@ -69,9 +66,6 @@ private MediationDisputeList(Storage storage, List checkArgument(dispute.getSupportType().equals(SupportType.MEDIATION), "Support type has to be MEDIATION")); - return protobuf.PersistableEnvelope.newBuilder().setMediationDisputeList(protobuf.MediationDisputeList.newBuilder() .addAllDispute(ProtoUtil.collectionToProto(new ArrayList<>(list)))).build(); } @@ -82,11 +76,7 @@ public static MediationDisputeList fromProto(protobuf.MediationDisputeList proto List list = proto.getDisputeList().stream() .map(disputeProto -> Dispute.fromProto(disputeProto, coreProtoResolver)) .collect(Collectors.toList()); - - list.forEach(e -> { - checkArgument(e.getSupportType().equals(SupportType.MEDIATION), "Support type has to be MEDIATION"); - e.setStorage(storage); - }); + list.forEach(e -> e.setStorage(storage)); return new MediationDisputeList(storage, list); } }