From 75cc7633a3db672848cc9a406063adb333223deb Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Mon, 12 Jul 2021 10:24:35 +0200 Subject: [PATCH] Return empty if no PaymentAccountPayload is available --- .../bisq/core/account/witness/AccountAgeWitnessService.java | 4 ++++ 1 file changed, 4 insertions(+) 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 b634f01a8d..4a5bc8f165 100644 --- a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java +++ b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java @@ -285,6 +285,10 @@ public class AccountAgeWitnessService { Optional findWitness(PaymentAccountPayload paymentAccountPayload, PubKeyRing pubKeyRing) { + if (paymentAccountPayload == null) { + return Optional.empty(); + } + byte[] accountInputDataWithSalt = getAccountInputDataWithSalt(paymentAccountPayload); byte[] hash = Hash.getSha256Ripemd160hash(Utilities.concatenateByteArrays(accountInputDataWithSalt, pubKeyRing.getSignaturePubKeyBytes()));