<p></p>
<p><b>@sqrrm</b> commented on this pull request.</p>

<p>I had hoped it would be easier to add the generic form for accounts, like using the protobuf from accountPayloads, but I can't figure how it could be done. I like the slim api, just a bit cumbersome to understand the serialization and reflection. I think it looks mostly good though. Just a few comments that need some more thought.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4819#discussion_r533418547">cli/src/main/java/bisq/cli/CliMain.java</a>:</p>
<pre style='color:#555'>> @@ -529,6 +555,23 @@ private static Method getMethodFromCmd(String methodName) {
         return Method.valueOf(methodName.toLowerCase());
     }
 
+    private static void saveFileToDisk(String prefix, String suffix, String text) {
+        String timestamp = Long.toUnsignedString(new Date().getTime());
+        String relativeFileName = prefix + "_" + timestamp + suffix;
+        try {
+            Path path = Paths.get(relativeFileName);
</pre>
<p>Where will this be written? Active directory from where cli is run?</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4819#discussion_r533431553">apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java</a>:</p>
<pre style='color:#555'>> +import static java.lang.String.format;
+import static java.lang.System.getProperty;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+
+
+import bisq.apitest.method.MethodTest;
+
+@Slf4j
+public class AbstractPaymentAccountTest extends MethodTest {
+
+    static final String PROPERTY_NAME_COMMENT = "_COMMENT_";
+    static final String PROPERTY_VALUE_COMMENT = "Please do not edit the paymentMethodId field.";
</pre>
<p>I don't think there is a need to be polite. Better with something like <code>"Do not manually edit the paymentMethodId field"</code></p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4819#discussion_r533435824">core/src/main/java/bisq/core/api/model/PaymentAccountForm.java</a>:</p>
<pre style='color:#555'>> + * accountName=Hal Cash Acct,
+ * tradeCurrencies=[FiatCurrency(currency=EUR)],
+ * selectedTradeCurrency=FiatCurrency(currency=EUR)
+ * )
+ * </pre>
+ */
+@Singleton
+@Slf4j
+public class PaymentAccountForm {
+
+    private final GsonBuilder gsonBuilder = new GsonBuilder()
+            .setPrettyPrinting()
+            .serializeNulls();
+
+    // Names of PaymentAccount fields to exclude from json forms.
+    private final String[] excludedFields = new String[]{
</pre>
<p>Why are all these fields excluded? Some probably should be but at least SALT would be necessary to set manually to be able to recover an account.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4819#discussion_r533449455">core/src/main/java/bisq/core/api/model/PaymentAccountTypeAdapter.java</a>:</p>
<pre style='color:#555'>> +        if (log.isDebugEnabled())
+            log.debug("Writing PaymentAccount json form for fields with accessors...");
</pre>
<p>Why check <code>if isDebugEnabled()</code> instead of just <code>log.debug(...)</code> without the <code>if</code>?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4819#pullrequestreview-541908388">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQIL6V3RG76GKPBLSTSST5Z7ANCNFSM4T2NLLUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNSNBYEK5EA2PVY5XEDSST5Z7A5CNFSM4T2NLLU2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEBGN3JA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4819#pullrequestreview-541908388",
"url": "https://github.com/bisq-network/bisq/pull/4819#pullrequestreview-541908388",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>