Closed zoedberg closed 4 months ago
Hi! thank you for your support. On the first point, I agree that it would be very useful to add a status field to the trade to provide more information to users.
For the second point, I am still unsure what the best solution might be. A trade involves two payments (one outbound and one inbound), so it would seem logical to also track both for the taker in listpayments (with the addition of a flag to specify the nature of the payment). However, considering that this change does not add substantial additional information, it might be more sensible to remove the swap payments from the maker side and maintain a logical separation between trade and payment. This would help clarify the distinction between trading activities and payment transactions.
@bitwalt thanks for sharing your opinion on this. We decided to remove the payments from the maker side and have addressed this, so closing. Just a note: instead of Whitelisted
we preferred using Waiting
While fixing and improving swap tests we've noticed that currently the taker has no way to see if a trade happened.
Therefore we think we should add more info to the existing
listtrades
API, which currently returns two lists (maker
andtaker
) ofTrade
s, where each trade has info about theqty_from
, theqty_to
, thefrom_asset
, theto_asset
and thepayment_hash
. By adding astatus
field to theTrade
object (which value could bewhitelisted
,expired
,pending
,failed
orsucceeded
) both maker and taker will be able to reconstruct information about the swaps they made or took (or tried to). About this proposal we don't have many doubts but if someone thinks there are better solutions we'll be happy to hear more proposals.Then there's another question: currently when a swap gets executed the
listpayments
API returns 2 payments on the maker side (one outbound and the other inbound), but no payment on the taker side. While this reflects what techically happens when a swap gets executed, we are worried this could cause confusion to the end-user. Here we are not sure what is the best solution, the possibilities we see are:@bitwalt we would appreciate your opinion on this since right now you're probably the only swap user we have