Browse Source

优化代码

875428575@qq.com 2 years ago
parent
commit
0921cc33ea
1 changed files with 8 additions and 8 deletions
  1. 8 8
      exchanges/tests/test.rs

+ 8 - 8
exchanges/tests/test.rs

@@ -7,7 +7,7 @@ use std::sync::{mpsc};
 use tokio::io::{AsyncReadExt, AsyncWriteExt};
 use exchanges::binance_usdt_swap_rest::BinanceUsdtSwapRest;
 use exchanges::kucoin_swap_rest::KucoinSwapRest;
-use exchanges::kuconin_swap_ws::{KuconinSubscribeType, KuconinSwapWs, KuconinWsType};
+use exchanges::kucoin_swap_ws::{KucoinSubscribeType, KucoinSwapWs, KucoinWsType};
 use exchanges::{proxy};
 use exchanges::binance_usdt_swap_ws::BinanceUsdtSwapWs;
 use exchanges::okx_swap_ws::{OkxSubscribeType, OkxSwapWs, OkxWsType};
@@ -50,9 +50,9 @@ async fn test_import() {
     // demo_rest_kucoin().await;
 
 
-    //Kuconin-ws--公共频道
+    //Kucoin-ws--公共频道
     // demo_ws_kucoin_pu().await;
-    //Kuconin-ws--私有频道
+    //Kucoin-ws--私有频道
     // demo_ws_kucoin_pr().await;
 
     //okx - Business 频道
@@ -166,9 +166,9 @@ async fn demo_ws_kucoin_pr() {
     btree_map.insert("pass_key".to_string(), "".to_string());
     trace!("----------------------btree_map{:?}", btree_map.clone());
     let (tx, mut rx) = channel(1024);
-    let mut ku_ws = KuconinSwapWs::new(false, btree_map.clone(),
-                                       KuconinWsType::Private, tx).await;
-    ku_ws.set_subscribe(vec![KuconinSubscribeType::PrContractMarketTradeOrdersSys]);
+    let mut ku_ws = KucoinSwapWs::new(false, btree_map.clone(),
+                                       KucoinWsType::Private, tx).await;
+    ku_ws.set_subscribe(vec![KucoinSubscribeType::PrContractMarketTradeOrdersSys]);
 
     let t1 = tokio::spawn(async move {
         ku_ws.custom_subscribe(vec!["ACHUSDTM".to_string(), "ROSEUSDTM".to_string()]).await;
@@ -189,8 +189,8 @@ async fn demo_ws_kucoin_pr() {
 async fn demo_ws_kucoin_pu() {
     let btree_map: BTreeMap<String, String> = BTreeMap::new();
     let (tx, mut rx) = channel(1024);
-    let mut ku_ws = KuconinSwapWs::new(false, btree_map, KuconinWsType::Public, tx).await;
-    ku_ws.set_subscribe(vec![KuconinSubscribeType::PuContractMarketLevel2Depth50]);
+    let mut ku_ws = KucoinSwapWs::new(false, btree_map, KucoinWsType::Public, tx).await;
+    ku_ws.set_subscribe(vec![KucoinSubscribeType::PuContractMarketLevel2Depth50]);
 
     let t1 = tokio::spawn(async move {
         ku_ws.custom_subscribe(vec!["ACHUSDTM".to_string(), "ROSEUSDTM".to_string()]).await;