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); }