diff --git a/core/src/main/java/haveno/core/offer/OfferPayload.java b/core/src/main/java/haveno/core/offer/OfferPayload.java index 2f377bab..fa05685d 100644 --- a/core/src/main/java/haveno/core/offer/OfferPayload.java +++ b/core/src/main/java/haveno/core/offer/OfferPayload.java @@ -390,6 +390,8 @@ public final class OfferPayload implements ProtectedStoragePayload, ExpirablePay null : new ArrayList<>(proto.getAcceptedBankIdsList()); List acceptedCountryCodes = proto.getAcceptedCountryCodesList().isEmpty() ? null : new ArrayList<>(proto.getAcceptedCountryCodesList()); + List reserveTxKeyImages = proto.getReserveTxKeyImagesList().isEmpty() ? + null : new ArrayList<>(proto.getReserveTxKeyImagesList()); String hashOfChallenge = ProtoUtil.stringOrNullFromProto(proto.getHashOfChallenge()); Map extraDataMapMap = CollectionUtils.isEmpty(proto.getExtraDataMap()) ? null : proto.getExtraDataMap(); @@ -431,7 +433,7 @@ public final class OfferPayload implements ProtectedStoragePayload, ExpirablePay proto.getProtocolVersion(), proto.hasArbitratorSigner() ? NodeAddress.fromProto(proto.getArbitratorSigner()) : null, ProtoUtil.byteArrayOrNullFromProto(proto.getArbitratorSignature()), - proto.getReserveTxKeyImagesList() == null ? null : new ArrayList(proto.getReserveTxKeyImagesList())); + reserveTxKeyImages); } @Override diff --git a/core/src/main/java/haveno/core/offer/OpenOfferManager.java b/core/src/main/java/haveno/core/offer/OpenOfferManager.java index eab1baff..9c0626fa 100644 --- a/core/src/main/java/haveno/core/offer/OpenOfferManager.java +++ b/core/src/main/java/haveno/core/offer/OpenOfferManager.java @@ -1754,7 +1754,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe log.warn("Offer {} has invalid arbitrator signature, reposting", openOffer.getId()); isValid = false; } - if (openOffer.getOffer().getOfferPayload().getReserveTxKeyImages() != null && (openOffer.getReserveTxHash() == null || openOffer.getReserveTxHash().isEmpty())) { + if ((openOffer.getOffer().getOfferPayload().getReserveTxKeyImages() != null || openOffer.getOffer().getOfferPayload().getReserveTxKeyImages().isEmpty()) && (openOffer.getReserveTxHash() == null || openOffer.getReserveTxHash().isEmpty())) { log.warn("Offer {} is missing reserve tx hash but has reserved key images, reposting", openOffer.getId()); isValid = false; } diff --git a/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java b/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java index 3388368a..200cad8c 100644 --- a/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java +++ b/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java @@ -102,11 +102,8 @@ public class MakerReserveOfferFunds extends Task { // reset state with wallet lock model.getXmrWalletService().resetAddressEntriesForOpenOffer(offer.getId()); - if (reserveTx != null) { - model.getXmrWalletService().thawOutputs(HavenoUtils.getInputKeyImages(reserveTx)); - offer.getOfferPayload().setReserveTxKeyImages(null); - } - + if (reserveTx != null) model.getXmrWalletService().thawOutputs(HavenoUtils.getInputKeyImages(reserveTx)); + offer.getOfferPayload().setReserveTxKeyImages(null); throw e; }