atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

Finished swap marked as recoverable

Open gcharang opened this issue 2 months ago • 3 comments

Komodo wallet shows a unlock funds button and clicking it fails. there seems to be discrepancy between the events in the swap json and what's shown in the wallet too

Swap json has

 "recoverable": true,
    "is_finished": true,
    "is_success": false

Swap json: https://gist.github.com/gcharang/caab59630e2f7a841a4f0f0b43fffb61

what kw shows:

Image

gcharang avatar Oct 31 '25 11:10 gcharang

AFAIK the my_swap_status RPC which returns the data above does not provide 'is_finished' or 'is_success' or 'recoverable' flags. So GUI figures out those statuses by analysing events returned by my_swap_status. We need to check that.

(BTW looks like in fact the swap finished correctly although its events contain refund errors: apparently both taker and maker successfully managed to spend their funds...)

dimxy avatar Oct 31 '25 14:10 dimxy

I also see differences, for a failed swap: in the swap exported data https://gist.github.com/dimxy/1b2e73a841778af41b7c443a72b1130f we see the swap was successfully refunded, but in the GUI swap history the swap was just failed at TakerPaymentSent event:

Image

Maybe this is more about how GUI processes swap status?

dimxy avatar Nov 03 '25 17:11 dimxy

This should be fixed as part of https://github.com/KomodoPlatform/komodo-defi-framework/pull/2280 , that is for the recover funds results to return more info and to have the state saved somewhere.

shamardy avatar Nov 05 '25 14:11 shamardy