|
|
@@ -374,7 +374,8 @@ impl BitMartSwapRest {
|
|
|
match code {
|
|
|
Some(c) => {
|
|
|
if c == 1000 {
|
|
|
- let data = json_value.get("data").unwrap();
|
|
|
+ let default_data = json!({});
|
|
|
+ let data = json_value.get("data").unwrap_or(default_data.borrow());
|
|
|
ResponseData::new(self.label.clone(), 200, "success".to_string(), data.clone())
|
|
|
} else {
|
|
|
ResponseData::new(self.label.clone(), 400, "message".to_string(), json_value)
|