浏览代码

let is_success = rst["status"].as_bool().unwrap();

skyffire 1 年之前
父节点
当前提交
9547d2808a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      strategy/src/strategy.rs

+ 1 - 1
strategy/src/strategy.rs

@@ -487,7 +487,7 @@ impl Strategy {
         if response.status().is_success() {
             let response_text = response.text().await.unwrap();
             let rst: Value = serde_json::from_str(response_text.as_str()).unwrap();
-            let is_success = rst.as_bool().unwrap();
+            let is_success = rst["status"].as_bool().unwrap();
 
             return if is_success {
                 let delta_sum = Decimal::from_f64(rst["delta_sum"].as_f64().unwrap()).unwrap();