Skip to content
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

failed swaps are not recognized by GUI #625

Open
jorian opened this issue Feb 26, 2020 · 0 comments
Open

failed swaps are not recognized by GUI #625

jorian opened this issue Feb 26, 2020 · 0 comments
Labels
bug mm2.0 mm2.0 protocol change related
Milestone

Comments

@jorian
Copy link

jorian commented Feb 26, 2020

Swaps that fail are not recognized by the GUI. This has been a change from mm1.0; in mm1.0 there wasn't a clear way to tell that a swap had failed.

In mm2.0 however, using the my_swap_status API call, there is a way to find out if something has failed.

As an example, I tried to swap 1 CHIPS for KMD. On the taker side (the HyperDEX app), the order stays in the Open Orders screen, with a matched label:

image

However, when I open one of the 2 failed swaps in the screenshot, I see this ugly error message:

image

The app should be able to recognize that the swap has failed, by issuing a my_swap_status call and look for events that are labeled [...]Failed, like the following example (this is the maker side of the same swap):

{
        "event": {
          "data": {
            "error": "maker_swap:449] utxo:842] utxo:546] utxo:546] rpc_clients:934] JsonRpcError { request: JsonRpcRequest { jsonrpc: \"2.0\", id: \"69275\", method: \"blockchain.scripthash.listunspent\", params: [String(\"2ae8a38b945cb64a96190d735fadca5ce9532b9e494b863aaeaedf6cf99b12c6\")] }, error: Transport(\"rpc_clients:770] rpc_clients:770] [\\\"rpc_clients:1412] common:1070] future timed out\\\"]\") }"
          },
          "type": "MakerPaymentTransactionFailed"
        },
        "timestamp": 1575016520768
      },

The type of this event ends with Failed.

So 2 things need fixing here:

  1. The label needs to show a swap has failed
  2. The user / app should remove such orders, as they clearly aren't Open Orders anymore. They should only show up in trade history.
@jorian jorian added bug mm2.0 mm2.0 protocol change related labels Feb 26, 2020
@jorian jorian added this to the 0.5.0-alpha milestone Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mm2.0 mm2.0 protocol change related
Projects
None yet
Development

No branches or pull requests

1 participant