|
|
@@ -553,7 +553,8 @@ impl CoinexSwapRest {
|
|
|
let text_result = response.text().await;
|
|
|
match text_result {
|
|
|
Ok(text) => {
|
|
|
- match serde_json::from_str(text.as_str()) {
|
|
|
+ let data_json_str: Result<Value, serde_json::Error> = serde_json::from_str(text.as_str());
|
|
|
+ match data_json_str {
|
|
|
Ok(data_json) => {
|
|
|
return if is_success && data_json["code"].to_string() == "0"{
|
|
|
self.on_success_data(data_json["data"].clone())
|