[bisq-network/bisq] Adjust API 'editoffer' to PR 5651 (include extraData field when editing offer) (#5666)
Stan
notifications at github.com
Wed Aug 25 16:04:57 CEST 2021
@ghubstan commented on this pull request.
> + if (log.isDebugEnabled()) {
+ log.debug("onAdded: Removed old offer {}\n"
+ + "\twith payload hash {} from list.\n"
+ + "\tThis may make a subsequent onRemoved( {} ) call redundant.",
+ offerId,
+ oldOfferItem.getHashOfPayload() == null ? "null" : oldOfferItem.getHashOfPayload().getHex(),
+ oldOfferItem.getOffer().getId());
+ }
RE comment below: _Does this mean an item with null hash will be removed if only the id matches? Seems like a way to get around the hash checks._
When a user clicks the view open, the list is populated by fillOfferBookListItems(), instantiating new OfferBookListItems with null hashes -- hashes are set only in onAdded or onRemoved.
When the OfferBook listener gets an onRemoved call, the hash match will fail if the list's match has a null hash, unless I do this extra null check. If/when we create a transient OfferPayload hash field, fillOfferBookListItems() can load the view with non-null hashes, and the null hash checks can be removed.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5666#discussion_r695786720
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210825/65431025/attachment.htm>
More information about the bisq-github
mailing list