diff --git a/app/src/main/java/com/example/dcav2gui/InstanceInterface.java b/app/src/main/java/com/example/dcav2gui/InstanceInterface.java index 007e215..3242dd2 100644 --- a/app/src/main/java/com/example/dcav2gui/InstanceInterface.java +++ b/app/src/main/java/com/example/dcav2gui/InstanceInterface.java @@ -447,10 +447,18 @@ public class InstanceInterface { String dealOrderHistory = value.has("deal_order_history") && value.get("deal_order_history").isJsonPrimitive() ? value.get("deal_order_history").getAsString() : null; String pauseReason = value.has("pause_reason") && value.get("pause_reason").isJsonPrimitive() ? value.get("pause_reason").getAsString() : null; String statusString = value.has("status_string") && value.get("status_string").isJsonPrimitive() ? value.get("status_string").getAsString() : null; - JsonObject oldLong = null; + JsonObject oldLong; + OldLongDictionary oldLongDictionary = null; if (value.has("old_long")) { oldLong = value.get("old_long").getAsJsonObject(); //translate from json to OldLongDictionary + oldLongDictionary = new OldLongDictionary( + oldLong.get("datetime").getAsString(), + oldLong.get("fees_paid_in_quote").getAsDouble(), + oldLong.get("quote_spent").getAsDouble(), + oldLong.get("tp_amount").getAsDouble(), + oldLong.get("tp_price").getAsDouble() + ); } valueToReturn.add(new WorkerStatsData( @@ -482,7 +490,7 @@ public class InstanceInterface { safetyPriceTable, dealOrderHistory, pauseReason, - oldLong, + oldLongDictionary, statusString )); } catch (Exception e) { @@ -621,6 +629,7 @@ public class InstanceInterface { workerStatsData.getPrice(), workerStatsData.getTakeProfitPrice(), workerStatsData.getIsShort(), + //Let's deal with this later false, false, false,