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

Support editing BSQ offers with API #5576

Merged
merged 33 commits into from
Aug 30, 2021

Conversation

ghubstan
Copy link
Member

@ghubstan ghubstan commented Jun 18, 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 fixed-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.

- 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.
Support for editing BSQ offers is in place, but will be added
in another PR.
Optionally displaying an ENABLED column in CLI side getoffer output
depends on the value of offer.isMyOffer, which is passed via new
boolean arguments to the trade & offer pojo builders.
BSQ offers are fixed-price only.  This change blocks an
attempt to change an altcoin offer to a margin price based
offer, or set a trigger price.
And log CLI's getoffer output to see getoffer formatting -- after adding
new ENABLED and TRIGGER-PRICE columns.
@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 acbf1e4 into bisq-network:master Aug 30, 2021
@ghubstan ghubstan deleted the 04-edit-bsq-offer branch August 30, 2021 14:35
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.

3 participants