bisq icon indicating copy to clipboard operation
bisq copied to clipboard

GetTrades should not filter open failed trades

Open jmacxx opened this issue 1 year ago • 2 comments

Fixes #7022

jmacxx avatar Feb 01 '24 00:02 jmacxx

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. Would it be possible to expose to the API an additional trade field (such as hasFailed, errorMessage or isMaybeInvalidTrade)?

The idea is to be able to use FailTrade(), which can only be done if the trade is identified.

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).

dutu avatar Feb 04 '24 19:02 dutu

Would it be possible to expose to the API an additional trade field (such as hasFailed, errorMessage

Added has_failed and error_message properties to API TradeInfo record.

ghost avatar Feb 12 '24 19:02 ghost