Sfoglia il codice sorgente

修改订单指令

gepangpang 2 anni fa
parent
commit
176ebb4867
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      standard/src/gate_swap.rs

+ 6 - 3
standard/src/gate_swap.rs

@@ -317,7 +317,7 @@ impl Platform for GateSwap {
                 let order_id = cancel_clone[&item_clone].get(0).unwrap().clone();
                 let handle = thread::spawn(move || {
                     runtime::Runtime::new().unwrap().block_on(async {
-                        let result = self_clone.cancel_order(&order_id, false).await;
+                        let result = self_clone.cancel_order(&order_id, true).await;
                         match result {
                             Ok(result) => {
                                 println!("{:?}", result);
@@ -334,7 +334,7 @@ impl Platform for GateSwap {
                 let order_id = cancel_clone[&item_clone].get(1).unwrap().clone();
                 let handle = thread::spawn(move || {
                     runtime::Runtime::new().unwrap().block_on(async {
-                        let result = self_clone.cancel_order(&order_id, true).await;
+                        let result = self_clone.cancel_order(&order_id, false).await;
                         match result {
                             Ok(result) => {
                                 println!("{:?}", result);
@@ -391,7 +391,10 @@ impl Platform for GateSwap {
                 runtime::Runtime::new().unwrap().block_on(async {
                     let value = check_clone[&item_clone].clone();
                     let cid = value.get(0).unwrap();
-                    let result = self_clone.get_order_detail(cid).await;
+                    let oid = value.get(1).unwrap();
+                    let is_custom_id = if cid.eq("") { false } else { true };
+                    let order_id = if cid.eq("") { oid } else { cid };
+                    let result = self_clone.get_order_detail(order_id, is_custom_id).await;
                     match result {
                         Ok(result) => {
                             println!("{:?}", result);