-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update api beta test guide: add 'editoffer' #5577
Update api beta test guide: add 'editoffer' #5577
Conversation
- 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.
Avoid inconsistent CLI output decimal formats across different systems' default locales.
Ok - I do understand the reasoning behind this, but from a developer perspective looking at the response I'd think I have to do an additional enable after creating the offer to get it publish. Maybe we could add another state like |
Yes, I was able to work with the current format as well, it is just an additional mental hurdle for devs playing around with the API. Sure, no need to squeeze JSON support into this PR as well, but I think it would make the API way more accessible for other devs trying to implement their use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
@ripcurlx Do you have any more comments on this PR?
I don't think the api calls should block. Better if the output would make it clearer that request is being processed, maybe by having a |
|
Sorry to chime in. What does the Enabled column signify? It sounds like it might functionally mean something different than it does semantically. You wouldn't expect it to go from disabled to enabled by itself. Maybe it's a synonym for published? Could there be a semantic conflict in there? PS: bravo for the work you've done @ghubstan |
Hey D, thanks for the nice comment. From the UI's open offers view, you can enable/disable an offer -- add/remove the offer from the offer book. |
Sounds like there's two state variables (at least implicitly). One is a settable variable signifying the state we request the offer to be in, and the other is a read-only variable for what state it actually is in. Thought it might be worth pointing out. The |
Use LinkedHashSet to maintain NetworkEnvelope ordering when Connection#onBundleOfEnvelopes calls listeners. Connection#onBundleOfEnvelopes builds a set from an ordered list of NetworkEnvelopes, then calls listeners during set iteration. The envelope list ordering is lost if a HashSet is built, but maintained by switching to a LinkedHashSet. Losing the envelope ordering becomes a problem if the peer receives a RemoveDataMessage and an AddDataMessage in the same batch of envelopes, and relays them to listeners in the wrong (random) order. For example, an API 'editoffer' call may result in the edited offer being added, then immediately remove from their UI's offer book.
This reverts commit add6536.
Resolve file conflicts resulting from merging PRs bisq-network#5577 bisq-network#5651
File conflicts resolved in child PR #5666 |
This is the 5th in a series of PRs, starting at #5570
#5576 Should be reviewed/merged before this one.