Polkadex-Substrate / polkadexTEE-worker

Polkadex Off-chain Orderbook
Apache License 2.0
10 stars 1 forks source link

Not able to parse Cancel Order Response from Openfinex #272

Closed zktony closed 2 years ago

zktony commented 2 years ago

Response_handle is throwing error while parsing response:-

[2021-08-31T07:03:24Z ERROR substratee_worker_enclave::openfinex::openfinex_api_impl] Sending order to openfinex: [1,0,"admin_cancel_order",["btcusd",["86a36f48-0a29-11ec-9287-0242ac170002"]]]
[2021-08-31T07:03:24Z ERROR substratee_worker_enclave::openfinex::response_lexer] Response from openfinex: "[2,0,\"admin_cancel_order\",[]]"
[2021-08-31T07:03:24Z ERROR substratee_worker_enclave::openfinex::response_handler] Failed to map response to objects: ResponseParsingError("Unknown or unsupported request type (CancelOrder), cannot map to response")
[2021-08-31T07:03:24Z ERROR substratee_worker_enclave::openfinex::response_lexer] Response from openfinex: "[5,\"oc\",[\"ALICE\",\"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\",\"btcusd\",1,\"86a36f48-0a29-11ec-9287-0242ac170002\",\"sell\",\"c\",\"l\",\"0.001\",\"0\",\"0.005\",\"0.005\",\"0\",0,1630393401]]"

And as mentioned in Issue #149. Which message we should treat as Success response?

zktony commented 2 years ago

Update This message should be treated as Success response:- [2021-08-31T07:03:24Z ERROR substratee_worker_enclave::openfinex::response_lexer] Response from openfinex: "[5,\"oc\",[\"ALICE\",\"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\",\"btcusd\",1,\"86a36f48-0a29-11ec-9287-0242ac170002\",\"sell\",\"c\",\"l\",\"0.001\",\"0\",\"0.005\",\"0.005\",\"0\",0,1630393401]]"

Document for Reference https://open-finance.org/private-events.html

haerdib commented 2 years ago

@zktony is this issue still up to date?