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

<blockquote>
<p>The <code>createoffer</code> and <code>createpaymentacct</code> methods have complex argument lists, and different devs may want them defined in in different ways. We should discuss?</p>
<p>Right now, <code>createoffer</code> also places the offer, and problems might be created by placing it before giving users a chance to review details first. I thought the default behavior should be to cache the new offer (with ID) in the daemon, show it to the user, and let them place the new offer with a different <code>confirmoffer offer-id</code> command. But I need some consensus on that too.</p>
</blockquote>
<p>For an API I'm not sure there is a use case for the <code>confirm offer</code> extra step. Automated code wouldn't gain anything and UIs should probably implement that locally.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4559#discussion_r498223238">cli/src/main/java/bisq/cli/NegativeNumberOptions.java</a>:</p>
<pre style='color:#555'>> +import java.util.Map;
+import java.util.function.Predicate;
+
+import static java.util.Arrays.stream;
+
+class NegativeNumberOptions {
+
+    private final Map<Integer, String> negativeNumberParams = new HashMap<>();
+
+    String[] removeNegativeNumberOptions(String[] args) {
+        // Cache any negative number params that will be rejected by the parser.
+        // This should be called before command line parsing.
+        for (int i = 0; i < args.length; i++) {
+            if (isNegativeNumber.test(args[i])) {
+                String param = args[i];
+                negativeNumberParams.put(i - 1, new BigDecimal(param).toString());
</pre>
<p>Why put at <code>i-1</code>? Wouldn't it be more natural to use <code>i</code>?</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4559#discussion_r498226054">cli/src/main/java/bisq/cli/NegativeNumberOptions.java</a>:</p>
<pre style='color:#555'>> +                nonOptionArgsClone.remove(idx);
+                nonOptionArgsClone.add(idx, v);
</pre>
<p>How about <code>nonOptionArgsClone.set(idx, v);</code>?</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4559#discussion_r498231732">cli/src/main/java/bisq/cli/CliMain.java</a>:</p>
<pre style='color:#555'>> +                    if (nonOptionArgs.size() < 9)
+                        throw new IllegalArgumentException("incorrect parameter count,"
+                                + " expecting buy | sell, payment acct id, currency code, amount, min amount,"
+                                + " use-market-based-price, fixed-price | mkt-price-margin, security-deposit");
</pre>
<p>Expected more than 8 options but only 8 expected options listed</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/4559#pullrequestreview-500317915">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSIREMGABZR5TKIC3DSIWX3NANCNFSM4RXT56GA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQ34BITW7ERMIAN5MTSIWX3NA5CNFSM4RXT56GKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODXJD5WY.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/4559#pullrequestreview-500317915",
"url": "https://github.com/bisq-network/bisq/pull/4559#pullrequestreview-500317915",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>