[bisq-network/bisq] Refactor offerpayload (#5121)

sqrrm notifications at github.com
Wed Jan 27 16:35:44 CET 2021


<!-- 
- make yourself familiar with the CONTRIBUTING.md if you have not already (https://github.com/bisq-network/bisq/blob/master/CONTRIBUTING.md)
- make sure you follow our [coding style guidelines][https://github.com/bisq-network/style/issues)
- pick a descriptive title
- provide some meaningful PR description below
- create the PR
- in case you receive a "Change request" and/or a NACK, please react within 30 days. If not, we will close your PR and it can not be up for compensation.
- After addressing the change request, __please re-request a review!__ Otherwise we might miss your PR as we tend to only look at pull requests tagged with a "review required".
-->

This is preparatory work for no fee tx offers. There should be no
behavioral changes with this commit.

Split OfferPayload into abstract OfferPayload and FeeTxOfferPayload with
implementation. Instance variables need to reside in FeeTxOfferPayload
in the same order as previously to keep the generated json contract
format.

Contract is still using FeeTxOfferPayload as I don't think Contract
will be used with any other OfferPayload type.

Only FeeTxOfferPayload will have the ability to update capabilities.
It seems better to just delete the old offer and create a new one
if there is no loss in doing so, which there won't be without the
fee tx.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5121

-- Commit Summary --

  * Refactor OfferPayload
  * Refactor rename protobuf.OfferPayload -> protobuf.FeeTxOfferPayload

-- File Changes --

    M apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingMarketPriceMarginTest.java (2)
    M core/src/main/java/bisq/core/offer/CreateOfferService.java (2)
    A core/src/main/java/bisq/core/offer/FeeTxOfferPayload.java (394)
    M core/src/main/java/bisq/core/offer/Offer.java (95)
    M core/src/main/java/bisq/core/offer/OfferPayload.java (408)
    M core/src/main/java/bisq/core/offer/OpenOfferManager.java (11)
    M core/src/main/java/bisq/core/proto/network/CoreNetworkProtoResolver.java (6)
    M core/src/main/java/bisq/core/support/dispute/DisputeManager.java (4)
    M core/src/main/java/bisq/core/trade/Contract.java (10)
    M core/src/main/java/bisq/core/trade/protocol/tasks/maker/MakerCreateAndSignContract.java (8)
    M core/src/main/java/bisq/core/trade/protocol/tasks/taker/TakerVerifyAndSignContract.java (7)
    M core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java (14)
    M core/src/test/java/bisq/core/account/witness/AccountAgeWitnessServiceTest.java (4)
    M core/src/test/java/bisq/core/offer/OfferMaker.java (2)
    M core/src/test/java/bisq/core/offer/OfferTest.java (4)
    M core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java (4)
    M core/src/test/java/bisq/core/trade/TradableListTest.java (4)
    M core/src/test/java/bisq/core/util/ProtoUtilTest.java (14)
    M desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java (10)
    M desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java (4)
    M desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java (4)
    M desktop/src/test/java/bisq/desktop/maker/OfferMaker.java (3)
    M desktop/src/test/java/bisq/desktop/util/DisplayUtilsTest.java (10)
    M proto/src/main/proto/pb.proto (10)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5121.patch
https://github.com/bisq-network/bisq/pull/5121.diff

-- 
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/5121
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210127/f2eca251/attachment.htm>


More information about the bisq-github mailing list