소스 검색

增加coinex pd和pk的remove处理

JiahengHe 1 년 전
부모
커밋
3a37763cfc
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      strategy/src/coinex_usdt_swap.rs

+ 5 - 1
strategy/src/coinex_usdt_swap.rs

@@ -175,6 +175,7 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
                         } else {
                             core.local_cancel_log.remove(&new_order.client_id);
                             core.local_orders_backup.remove(&new_order.client_id);
+                            core.local_orders.remove(&new_order.client_id);
                         }
                     } else {
                         rst.push(new_order.clone());
@@ -217,12 +218,15 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
                         } else {
                             core.local_cancel_log.remove(&new_order.client_id);
                             core.local_orders_backup.remove(&new_order.client_id);
+                            core.local_orders.remove(&new_order.client_id);
                         }
                     } else {
                         rst.push(new_order.clone());
                     }
                 }
-                &_ => {}
+                &_ => {
+                    rst = order_infos;
+                }
             }
 
             core.update_order(rst, trace_stack).await;