-
Notifications
You must be signed in to change notification settings - Fork 222
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
What does the output of the cancel command mean. #844
Comments
there are internal entries for a swap in progress. there can be more than one, ie. request, reserved, connect, connected. so if numentries is 0, then it is likely already moved onto a DB/SWAPS swap all this is very edge casey... to be sure the swap status needs to be issued to see what the swapstatus is |
Can we also rely on socket messages or would that be subject to edgecases too and we should fall back to
But it only does that before it's matched ( |
it is unpredictable. it is doing the best it can to stop the swap. i think the best way is to do a swapstatus and make sure it doesnt advance. lack of activity is the only proof that the swap is stopped |
Ok, thanks. |
Add orderbook_depth RPC jl777#700.
Related: atomiclabs/hyperdex#129
We're trying to add a cancel button to allow users to panic cancel incorrect trades.
If the trade hasn't been matched yet it normally works fine and we get:
And a failed message is sent over the socket so we can correctly update our UI.
If we cancel as soon as it's been matched but before any TXs have been sent we get:
The swap never normally cancels at this point. Should it? When is a swap considered "started"? After being matched or after the first TX.
And what does stopping trade negotiation mean? Is there any way for us to check if the negotiation has been stopped so we can update the UI and say it's no longer pending/matched? Should we get a failed event over the socket in this scenario if the negotiation is stopped?
Cancelling again right after the first TX has been sent will return:
(same response but
numentries
is now0
)What is
numentries
referring to? Whether or not the swap has already started?I understand swaps shouldn't and won't be cancelled after they've started. But I'm not sure exactly when that is. We need a way to reliably determine from the response whether the swap will continue or be stopped so we can update the UI to notify the user.
The text was updated successfully, but these errors were encountered: