From c0eb41a8548e90bf063de2203b3925250f7ee6d2 Mon Sep 17 00:00:00 2001 From: U65535F <132809543+U65535F@users.noreply.github.com> Date: Fri, 28 Feb 2025 07:30:44 +0530 Subject: [PATCH] modify toJson to use a type hierarchy adapter --- core/src/main/java/haveno/core/payment/PaymentAccount.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/haveno/core/payment/PaymentAccount.java b/core/src/main/java/haveno/core/payment/PaymentAccount.java index b692b51faf..9ff8e70d2d 100644 --- a/core/src/main/java/haveno/core/payment/PaymentAccount.java +++ b/core/src/main/java/haveno/core/payment/PaymentAccount.java @@ -340,9 +340,9 @@ public void revertChanges() { // ---------------------------- SERIALIZATION ----------------------------- public String toJson() { - Gson gson = gsonBuilder - .registerTypeAdapter(PaymentAccount.class, new PaymentAccountTypeAdapter(this.getClass())) - .create(); + Gson gson = new GsonBuilder() + .registerTypeHierarchyAdapter(PaymentAccount.class, new PaymentAccountTypeAdapter(this.getClass())) + .create(); return gson.toJson(this); }