GetTrades should not filter open failed trades#7023
GetTrades should not filter open failed trades#7023alejandrogarcia83 merged 1 commit intomasterfrom unknown repository
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). |
alvasw
left a comment
There was a problem hiding this comment.
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.
Fixes #7022