KomodoPlatform / komodo-wallet-desktop

Komodo Wallet Desktop GUI
https://atomicdex.io
GNU General Public License v2.0
238 stars 207 forks source link

[BUG]: old orders can't be cancelled #1403

Closed cipig closed 2 years ago

cipig commented 2 years ago

The reason for all the non-match able orders in many orderbooks is found. Users can't cancel old orders. I quote form discord messages:

It does not appear in Orders, but it appears on the Trading screen, and when I hover over it and press the X sign, it does not cancel.

I have noticed similar behavior of atomicDex: sometimes it stops displaying orders in orders and history tabs (no orders found) and in that case you cannot even cancel the orders in the orderbook tab.

Those orders stay in orderbook forever, can't be matched by anyone and very often literally halt all the trading on the affected pairs.

This bug is P -100 for me.

tonymorony commented 2 years ago

that's definitely looks like P0 and very bad if it's the case

@smk762, please contact affected users in discord to find out the reason/reproduce

Milerius commented 2 years ago

The reason for all the non-match able orders in many orderbooks is found. Users can't cancel old orders. I quote form discord messages:

It does not appear in Orders, but it appears on the Trading screen, and when I hover over it and press the X sign, it does not cancel.

I have noticed similar behavior of atomicDex: sometimes it stops displaying orders in orders and history tabs (no orders found) and in that case you cannot even cancel the orders in the orderbook tab.

Those orders stay in orderbook forever, can't be matched by anyone and very often literally halt all the trading on the affected pairs.

This bug is P -100 for me.

The reason is that this user uses his seed on multiple device and that is_mine from mm2 RPC despite that it's not present in my_orders. And GUI simply adds a X button that reflects MM2 API, IMHO this issue is open in the wrong repository.

tonymorony commented 2 years ago

Yeah, user can cancel orders only from the device on which it's placed (where it persists in DB). If it's really what happened - there is not much we can do from GUI side.

Milerius commented 2 years ago

Yeah, user can cancel orders only from the device on which it's placed (where it persists in DB). If it's really what happened - there is not much we can do from GUI side.

In this case, cancel_order will fail because order doesn't exist, we can maybe show a message that explain the reason to the user.

smk762 commented 2 years ago

One of the users facing this issue says they are not using 2 instances of mm2 - they are running atomicdex in a guest VM on linux. Could this perhaps result in some networking issues?

cipig commented 2 years ago

see also https://github.com/KomodoPlatform/atomicDEX-API/issues/1148 which i guess is the actual problem... in certain situations, file from disk is removed (mm2/DB/xxxx/ORDERS/MY), but order still present in orderbook... saw it happening on my ADEX Desktop after restart (balance was not enough to restore old order from previous run, order cancelled by mm2, but still in orderbook)... since file is deleted, ADEX Desktop can't cancel that order

cipig commented 2 years ago

steps to reproduce with GUI: https://github.com/KomodoPlatform/atomicDEX-API/issues/1148#issuecomment-998820486 but it's a mm2 bug, so closing here