瀏覽代碼

增加rest撤单成功remove

JiahengHe 1 年之前
父節點
當前提交
314621222e
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      standard/src/coinex_swap.rs

+ 5 - 2
standard/src/coinex_swap.rs

@@ -643,8 +643,11 @@ impl Platform for CoinexSwap {
             let handle = spawn(async move {
                 let result = self_clone.cancel_order(&order_id, &custom_id).await;
                 match result {
-                    Ok(_) => {
-                        // self_clone.order_sender.send(order).await.unwrap();
+                    Ok(order) => {
+                        if order.status == "REMOVE" {
+                            // 由于有时撤单成功ws不推送,所以加入rest
+                            self_clone.order_sender.send(order).await.unwrap();
+                        }
                     }
                     Err(error) => {
                         // info!("撤单失败:{:?}", error.to_string());