-
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
GetTrades should not filter open failed trades #7023
Conversation
Thanks @jmacxx, I've applied and tested the change on v1.9.14 and it works as intended. However, I could not see an obvious way to differentiate a trade that has failed from a valid trade. The idea is to be able to use Note: The issue with leaving a failed trade in the open trade list, is when the offer is made available again and a new trade is taken. The new trade will have the same id as previously failed trade (the id of the offer). I have previously encountered issues when calling a trade API method complaining the trade is in an invalid state (it seems that due to two trades with same id, the failed trade was picked up when calling the method). |
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.
Nit
I know that someone else wrote the original code but we should try to clean up existing code when working on it. We can avoid the redudant copying of the trade list by using Collections.unmodifiableList(getObservableList())
.
Apart from that I aggree with @dutu. API consumers should be able to tell whether a trade failed.
Added |
API add has_failed and error_message properties to TradeInfo. Code review fixes from @dutu.
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
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
Fixes #7022