diff --git a/core/src/main/java/bisq/core/offer/OfferBookService.java b/core/src/main/java/bisq/core/offer/OfferBookService.java index 61a7d781b7b..a589e187452 100644 --- a/core/src/main/java/bisq/core/offer/OfferBookService.java +++ b/core/src/main/java/bisq/core/offer/OfferBookService.java @@ -94,7 +94,7 @@ public void onAdded(Collection protectedStorageEntries) { OfferPayload offerPayload = (OfferPayload) protectedStorageEntry.getProtectedStoragePayload(); Offer offer = new Offer(offerPayload); offer.setPriceFeedService(priceFeedService); - P2PDataStorage.ByteArray hashOfPayload = get32ByteHashAsByteArray(protectedStorageEntry); + P2PDataStorage.ByteArray hashOfPayload = get32ByteHashAsByteArray(offerPayload); listener.onAdded(offer, hashOfPayload, protectedStorageEntry.getSequenceNumber()); } })); @@ -107,7 +107,7 @@ public void onRemoved(Collection protectedStorageEntries) OfferPayload offerPayload = (OfferPayload) protectedStorageEntry.getProtectedStoragePayload(); Offer offer = new Offer(offerPayload); offer.setPriceFeedService(priceFeedService); - P2PDataStorage.ByteArray hashOfPayload = get32ByteHashAsByteArray(protectedStorageEntry); + P2PDataStorage.ByteArray hashOfPayload = get32ByteHashAsByteArray(offerPayload); listener.onRemoved(offer, hashOfPayload, protectedStorageEntry.getSequenceNumber()); } })); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java index b6904639a6f..351550e3930 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java @@ -166,25 +166,6 @@ public void removeOffer(Offer offer, P2PDataStorage.ByteArray hashOfPayload, int offer.getId(), hashOfPayload == null ? "null" : hashOfPayload.getHex()); } - - // The OfferBookListItem with a null or matching payload-hash was not found. - // However, when the API's CLI is used to edit and deactivate an offer - // in the same command, the edited offer is not re-published (and cannot be - // found in local storage). In this case, we need to remove the deactivated - // offer from the list if the local store does not contain an offer with a - // matching offerId. - if (!isStoredLocally(offer)) { - Optional viewItem = getOfferBookListItem(offer); - viewItem.ifPresent((item) -> { - offerBookListItems.remove(item); - if (log.isDebugEnabled()) { - log.debug("Storage does not contain an offer with id {} either;" - + " it is removed from UI view list.", - offer.getId()); - } - }); - } - return; }