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

<p>utACK</p>
<p>Had a look at the String param changes and added some comments.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/1841#discussion_r229489714">core/src/main/java/bisq/core/dao/state/DaoStateService.java</a>:</p>
<pre style='color:#555'>> @@ -770,7 +773,22 @@ public void setNewParam(int blockHeight, Param param, long paramValue) {
                 });
     }
 
-    public long getParamValue(Param param, int blockHeight) {
+    public Coin getParamValueAsCoin(Param param, int blockHeight) {
</pre>
<p>These getParamValueAs...() functions could use a check that they're used correctly.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/1841#discussion_r229494759">core/src/main/java/bisq/core/util/BsqFormatter.java</a>:</p>
<pre style='color:#555'>> +        validateCoinInput(input, btcCoinFormat);
+    }
+
+    public void validateBsqInput(String input) throws ValidationException {
+        validateCoinInput(input, this.coinFormat);
+    }
+
+    private void validateCoinInput(String input, MonetaryFormat coinFormat) throws ValidationException {
+        try {
+            coinFormat.parse(cleanDoubleInput(input));
+        } catch (Throwable t) {
+            throw new ValidationException("Invalid format for a " + coinFormat.code() + " value");
+        }
+    }
+
+    public String formatParamValue(Param param, String value) {
</pre>
<p>Would be nice if these functions could avoid the large switch blocks and use the ParamType now that it's been added. I think it would make sense, might take a look at that later, I think it would be safer.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/1841#discussion_r229497066">core/src/main/java/bisq/core/dao/governance/proposal/param/ChangeParamValidator.java</a>:</p>
<pre style='color:#555'>> @@ -59,120 +62,118 @@ public void validateDataFields(Proposal proposal) throws ValidationException {
         }
     }
 
-    // TODO
-    public void validateParamValue(Param param, long paramValue) throws ChangeParamValidationException {
-        // max 4 times the current value. min 25% of current value as general boundaries
-        checkMinMax(param, paramValue, 300, -75);
+    public void validateParamValue(Param param, String inputValue) throws ValidationException {
</pre>
<p>All these values would be nice to have in Param.java to be able to see all the relevant info for each param. Perhaps ParamType could also store the restrictions?</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/1841#pullrequestreview-170004816">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtqokHplvaoGRLLaehH42K6zPky89ks5uqM0PgaJpZM4YBDk3">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtqLeY36sMhNcv1FF7OiWfit1PKnTks5uqM0PgaJpZM4YBDk3.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq","title":"bisq-network/bisq","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sqrrm commented on #1841"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq/pull/1841#pullrequestreview-170004816"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/1841#pullrequestreview-170004816",
"url": "https://github.com/bisq-network/bisq/pull/1841#pullrequestreview-170004816",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@sqrrm commented on 1841",
"sections": [
{
"text": "utACK\r\n\r\nHad a look at the String param changes and added some comments.",
"activityTitle": "**sqrrm**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@sqrrm",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1841#pullrequestreview-170004816"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 402929975\n}"
}
],
"themeColor": "26292E"
}
]</script>