KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
104 stars 94 forks source link

[bug] last_updated for taker matches is ever set as 0 #1852

Closed rozhkovdmitrii closed 1 year ago

rozhkovdmitrii commented 1 year ago

Impact

last_updated for taker matches is ever set as 0. It could be checked using order_status, best_orders, my_orders command.

Example

adex-cli buy MORTY RICK 0.01 1.001
Buying: 0.01 MORTY for: 0.01001 RICK at the price of 1.001 RICK per MORTY
bb5287ea-316d-49d4-88a8-2a8b4c20971d
adex-cli order-status $UUID
Getting order status: bb5287ea-316d-49d4-88a8-2a8b4c20971d
                uuid: bb5287ea-316d-49d4-88a8-2a8b4c20971d
      req.(base,rel): MORTY(0.01), RICK(0.01001)
          req.action: Buy
  req.(sender, dest): 264fcd9401d797c50fe2f1c7d5fe09bbc10f3838c1d8d6f793061fa5f38b2b4d, 0000000000000000000000000000000000000000000000000000000000000000
        req.match_by: Any
   req.conf_settings: 1,false:1,false
          created_at: 23-05-31 11:28:24
          order_type: GoodTillCancelled
         cancellable: false
             matches: 
                      uuid: 31f5ce71-0f19-45e9-99cd-560f4388b2ed
       reserved.(base,rel): MORTY(0.01), RICK(0.0099999999)
   reserved.(taker, maker): bb5287ea-316d-49d4-88a8-2a8b4c20971d,31f5ce71-0f19-45e9-99cd-560f4388b2ed
   reserved.(sender, dest): 7310a8fb9fd8f198a1a21db830252ad681fccda580ed4101f3f6bfb98b34fab5,0000000000000000000000000000000000000000000000000000000000000000
    reserved.conf_settings: 1,false:1,false
              last_updated: 0
     connect.(taker,maker): bb5287ea-316d-49d4-88a8-2a8b4c20971d,31f5ce71-0f19-45e9-99cd-560f4388b2ed
    connect.(sender, dest): 264fcd9401d797c50fe2f1c7d5fe09bbc10f3838c1d8d6f793061fa5f38b2b4d,7310a8fb9fd8f198a1a21db830252ad681fccda580ed4101f3f6bfb98b34fab5

That is an response data:

TTP/1.1 200 OK
access-control-allow-origin: http://localhost:3000
content-length: 1653
date: Wed, 31 May 2023 11:28:27 GMT

{"type":"Taker","order":{"request":{"uuid":"bb5287ea-316d-49d4-88a8-2a8b4c20971d","base":"MORTY","rel":"RICK","base_amount":"0.01","base_amount_rat":[[1,[1]],[1,[100]]],"rel_amount":"0.01001","rel_amount_rat":[[1,[1001]],[1,[100000]]],"action":"Buy","method":"request","sender_pubkey":"264fcd9401d797c50fe2f1c7d5fe09bbc10f3838c1d8d6f793061fa5f38b2b4d","dest_pub_key":"0000000000000000000000000000000000000000000000000000000000000000","match_by":{"type":"Any"},"conf_settings":{"base_confs":1,"base_nota":false,"rel_confs":1,"rel_nota":false}},"created_at":1685532504120,"matches":{"31f5ce71-0f19-45e9-99cd-560f4388b2ed":{"reserved":{"base":"MORTY","rel":"RICK","base_amount":"0.01","base_amount_rat":[[1,[1]],[1,[100]]],"rel_amount":"0.0099999999","rel_amount_rat":[[1,[99999999]],[1,[1410065408,2]]],"taker_order_uuid":"bb5287ea-316d-49d4-88a8-2a8b4c20971d","maker_order_uuid":"31f5ce71-0f19-45e9-99cd-560f4388b2ed","sender_pubkey":"7310a8fb9fd8f198a1a21db830252ad681fccda580ed4101f3f6bfb98b34fab5","dest_pub_key":"0000000000000000000000000000000000000000000000000000000000000000","conf_settings":{"base_confs":1,"base_nota":false,"rel_confs":1,"rel_nota":false},"method":"reserved"},"connect":{"taker_order_uuid":"bb5287ea-316d-49d4-88a8-2a8b4c20971d","maker_order_uuid":"31f5ce71-0f19-45e9-99cd-560f4388b2ed","method":"connect","sender_pubkey":"264fcd9401d797c50fe2f1c7d5fe09bbc10f3838c1d8d6f793061fa5f38b2b4d","dest_pub_key":"7310a8fb9fd8f198a1a21db830252ad681fccda580ed4101f3f6bfb98b34fab5"},"connected":null,"last_updated":0}},"order_type":{"type":"GoodTillCancelled"},"cancellable":false,"base_orderbook_ticker":null,"rel_orderbook_ticker":null}
rozhkovdmitrii commented 1 year ago

cc: @shamardy , @smk762

rozhkovdmitrii commented 1 year ago

This behavior should not be solved on dev branch and will be solved in the scope of PR 1768