[bisq-network/bisq] Support editing BSQ offers with API (#5576)

Stan notifications at github.com
Fri Jun 18 23:06:16 CEST 2021

This change adds support for enabling/disabling BSQ offers, editing BSQ offers' fixed-prices, and fixes some CLI side `getoffer(s)` & `getmyoffer(s)` output display bugs.

- Adjusted API's core services & models to support passing enable/disable flag to CLI. (This depends on the `Offer.isMyOffer(pubkey) `return value.)

- Removed temporary block on editing BSQ offers via API's `CoreOffersService`.

- Added check in `EditOfferValidator` to block attempts to edit BSQ offer mkt-margin-price or trigger-price. (BSQ offers are fixe-price only.)
- Logged CLI side `getmyoffer` output in `EditOfferTest`, to see the CLI side offer formatting changes.  

- Added BSQ offer editing tests to `EditOfferTest`.

- Fixed some test function names.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Refactor EditOfferDataModel for new editoffer api method
  * Fix comment
  * Add OfferInfo field isActivated, rpc EditOffer to proto
  * Add server/core editOffer, adjust getMyOffer(s) impls
  * Refactor GrpcClient: request builders moved bisq.cli.request pkg
  * Add new EditOfferOptionParser and test
  * Add editoffer method help
  * Add editoffer to CLI
  * Add editoffer api tests & minor apitest refactoring
  * Remove chase quickpay acct test
  * Remove unused import
  * Fix problems found in codacy check
  * Fix codacy issue
  * Fix log arg spec bug
  * Add bool isMyOffer to OfferInfo proto
  * Fix editoffer validation bugs, tidy up CoreOffersService
  * Show enable/trigger-price cols for 'getmyoffer'
  * Improve 'editoffer' opt parsing, fix test pkg name
  * Add editoffer test case, suppress annoying warnings
  * Remove unused field
  * Throw exception is edit altcoin offer is attempted
  * Avoid duplicate test run
  * Make codacy just a bit happier
  * Force codacy check after codacy config change
  * Include isMyOffer flag in API's trade/offer proto wrappers
  * Pass isMyOffer flag to trade/offer proto wrappers from core services
  * Add altcoin (bsq) offer editing validation check
  * Optionally show ENABLED column in CLI's getoffer(bsq) output
  * Add BSQ offer editing tests to EditOfferTest

-- File Changes --

    M apitest/src/test/java/bisq/apitest/method/offer/AbstractOfferTest.java (58)
    M apitest/src/test/java/bisq/apitest/method/offer/CancelOfferTest.java (3)
    M apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingMarketPriceMarginTest.java (67)
    A apitest/src/test/java/bisq/apitest/method/offer/EditOfferTest.java (644)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java (3)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java (3)
    A apitest/src/test/java/bisq/apitest/scenario/LongRunningOfferDeactivationTest.java (167)
    M apitest/src/test/java/bisq/apitest/scenario/OfferTest.java (30)
    M apitest/src/test/java/bisq/apitest/scenario/bot/BotClient.java (6)
    M apitest/src/test/java/bisq/apitest/scenario/bot/RandomOffer.java (9)
    M cli/src/main/java/bisq/cli/CliMain.java (42)
    M cli/src/main/java/bisq/cli/ColumnHeaderConstants.java (3)
    M cli/src/main/java/bisq/cli/CurrencyFormat.java (62)
    M cli/src/main/java/bisq/cli/GrpcClient.java (377)
    M cli/src/main/java/bisq/cli/Method.java (1)
    M cli/src/main/java/bisq/cli/TableFormat.java (185)
    M cli/src/main/java/bisq/cli/opts/AbstractMethodOptionParser.java (4)
    A cli/src/main/java/bisq/cli/opts/EditOfferOptionParser.java (281)
    M cli/src/main/java/bisq/cli/opts/OptLabel.java (2)
    A cli/src/main/java/bisq/cli/request/OffersServiceRequest.java (320)
    A cli/src/main/java/bisq/cli/request/PaymentAccountsServiceRequest.java (85)
    A cli/src/main/java/bisq/cli/request/TradesServiceRequest.java (94)
    A cli/src/main/java/bisq/cli/request/WalletsServiceRequest.java (192)
    A cli/src/test/java/bisq/cli/opts/EditOfferOptionParserTest.java (346)
    R cli/src/test/java/bisq/cli/opts/OptionParsersTest.java (11)
    M core/src/main/java/bisq/core/api/CoreApi.java (47)
    M core/src/main/java/bisq/core/api/CoreOffersService.java (193)
    A core/src/main/java/bisq/core/api/EditOfferValidator.java (141)
    M core/src/main/java/bisq/core/api/model/OfferInfo.java (45)
    M core/src/main/java/bisq/core/api/model/TradeInfo.java (10)
    A core/src/main/java/bisq/core/offer/MutableOfferPayloadFields.java (89)
    M core/src/main/java/bisq/core/offer/OfferUtil.java (47)
    A core/src/main/resources/help/editoffer-help.txt (95)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (31)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java (6)
    M desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java (49)
    M proto/src/main/proto/grpc.proto (33)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210618/5b118668/attachment.htm>

More information about the bisq-github mailing list