Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new api method 'editoffer' #5572

Merged
merged 26 commits into from Aug 30, 2021

Conversation

ghubstan
Copy link
Member

To help review from bottom to top, commits are listed here in bottom to top order.

  • 1daf471 Add OfferInfo field isActivated, rpc EditOffer to grpc.proto

  • 2b8b53b Add server/core editOffer, adjust getMyOffer(s) impls
    Add editOffer to GrpcOffersService, CoreApi, CoreOffersService.
    Set editOffer call rate meter to 1 / minute.
    Use new EditOfferValidator to verify editOffer params OK.
    Adust getMyOffer(s) rpc impl and OfferInfo model to use OpenOffer for accessing activation state and trigger price.

  • 9231e48 Refactor GrpcClient: request building code moved into bisq.cli.request pkg
    Reduces size of GrpcClient while allowing for new, bot-friendly variations of the new grpc.editOffer method. (Various combinations of editoffer parameters are allowed and disallowed; the bot-friendly grpc.editOffer variations help disambiguate those parameter combinations.)

  • d2939cc Add new EditOfferOptionParser & test

  • 2344285 Add editoffer method help

  • be249c5 Add editoffer to CLI

  • 929b28c Add editoffer api tests & minor apitest refactoring

This is the 3rd in a series of PRs, starting at #5570
#5571 Should be reviewed/merged before this one.

The new editoffer method works, and is documented in editoffer-help.txt, but some follow up work is needed.
Next PR(s) will be:

  • Adjust getmyoffer(s) CLI output for new 'enabled' and 'trigger-price' columns.
  • Adjust apitest trading scripts to new getmyoffer(s) CLI output.
  • Adjust apitest user guide for new editoffer, and to new getmyoffer(s) CLI output.

- Define set of editable offer payload fields in MutableOfferPayloadFields.

- Move bulk of EditOfferDataModel#onPublishOffer logic to OfferUtil.
- Add editOffer to GrpcOffersService, CoreApi, CoreOffersService.

- Set editOffer call rate meter to 1 / minute.

- Use new EditOfferValidator to verify editOffer params OK.

- Adust getMyOffer(s) rpc impl and OfferInfo model to use OpenOffer
  for accessing activation state and trigger price.
Reduces size of GrpcClient while allowing for additional bot-friendly
variations of the new grpc editOffer method.
@ghubstan ghubstan changed the title Add new api method 'editoffer' [WIP] Add new api method 'editoffer' Jun 13, 2021
@ghubstan ghubstan marked this pull request as draft June 13, 2021 20:48
@ghubstan ghubstan closed this Jun 13, 2021
@ghubstan ghubstan changed the title [WIP] Add new api method 'editoffer' Add new api method 'editoffer' Jun 15, 2021
@ghubstan ghubstan reopened this Jun 15, 2021
@ghubstan ghubstan marked this pull request as ready for review June 15, 2021 15:06
@ghubstan
Copy link
Member Author

TODO in next PR: Update api beta test guide and trading simulation script.

@ghubstan
Copy link
Member Author

This codacy issue should be ignored because an apparent IDE bug will not allow me to use only AVAILABLE.

core/src/main/java/bisq/core/api/CoreOffersService.java
Unnecessary use of fully qualified name 'State.AVAILABLE' due to existing static import 'bisq.core.offer.OpenOffer.State.AVAILABLE'
editedOffer.setState(State.AVAILABLE);

Support for editing BSQ offers is in place, but will be added
in another PR.
@ripcurlx
Copy link
Contributor

This codacy issue should be ignored because an apparent IDE bug will not allow me to use only AVAILABLE.

core/src/main/java/bisq/core/api/CoreOffersService.java
Unnecessary use of fully qualified name 'State.AVAILABLE' due to existing static import 'bisq.core.offer.OpenOffer.State.AVAILABLE'
editedOffer.setState(State.AVAILABLE);

I ignored the issue. Could you please try to force push again to re-trigger codacy? Thanks!

@ripcurlx ripcurlx added this to the v1.6.6 milestone Jun 17, 2021
@ghubstan
Copy link
Member Author

TODO in next PR: Update api beta test guide and trading simulation script.

This TODO was to tell me what goes in the next PR.

@ghubstan
Copy link
Member Author

File conflicts resolved in child PR #5666

@ripcurlx ripcurlx modified the milestones: v1.7.3, v1.7.4 Aug 23, 2021
@sqrrm sqrrm merged commit 8115866 into bisq-network:master Aug 30, 2021
@ghubstan ghubstan deleted the 03-api-editoffer-method branch August 30, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants