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

<p>Thanks for improving the dust handling.</p>
<p>Please see inline comments on the code.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4093#discussion_r398543202">desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java</a>:</p>
<pre style='color:#555'>> @@ -629,6 +631,17 @@ public void updateItem(final WithdrawalListItem item, boolean empty) {
                     }
                 });
     }
+
+    private Coin getDust(Transaction tx) {
+        Coin dust = Coin.ZERO;
+        for (TransactionOutput txo: tx.getOutputs()) {
+            if (txo.getValue().value < 546) {
</pre>
<p>Better use a constant for values like the dust limit.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4093#discussion_r398560652">desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java</a>:</p>
<pre style='color:#555'>> @@ -330,8 +331,9 @@ private void onWithdraw() {
                     feeEstimationTransaction = walletService.getFeeEstimationTransactionForMultipleAddresses(fromAddresses, sendersAmount);
                 }
                 checkNotNull(feeEstimationTransaction, "feeEstimationTransaction must not be null");
-                Coin fee = feeEstimationTransaction.getFee();
-                sendersAmount = feeExcluded ? amountAsCoin.add(fee) : amountAsCoin;
+                Coin dust = getDust(feeEstimationTransaction);
+                Coin fee = feeEstimationTransaction.getFee().add(dust);
+                sendersAmount = feeExcluded ? amountAsCoin.add(fee) : amountAsCoin.add(dust);
</pre>
<p>The added complexity of the dust on top of the fee makes this code really hard to read. It's not transparent to neither the developer nor the user what will happen here. The dust amount is so low that it's unlikely to cause monetary damage, but users expect a certain amount to be sent and when the dust is added it might cause confusion. (If I got it right,the dust is added as fee or sent amount depending on whether feeExcluded is set or not)</p>
<p>I suggest making this code easier to follow, and adding a notice to the user that dust might be padded to the fee and make sure it's only padding the fee.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4093#discussion_r398561523">desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java</a>:</p>
<pre style='color:#555'>> @@ -629,6 +631,17 @@ public void updateItem(final WithdrawalListItem item, boolean empty) {
                     }
                 });
     }
+
+    private Coin getDust(Transaction tx) {
+        Coin dust = Coin.ZERO;
+        for (TransactionOutput txo: tx.getOutputs()) {
+            if (txo.getValue().value < 546) {
+                dust = dust.add(txo.getValue());
+                log.info("dust TXO = {}", txo.getValue().toFriendlyString());
</pre>
<p>As an avid log reader, a bit more context will really help understand what's going on here.</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/4093#pullrequestreview-381971817">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVCJ4KYVEYVNTDP7XLRJNIWLANCNFSM4LSWP43Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXEEXEY3DGOXZB4DJ3RJNIWLA5CNFSM4LSWP432YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOC3CG22I.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/4093#pullrequestreview-381971817",
"url": "https://github.com/bisq-network/bisq/pull/4093#pullrequestreview-381971817",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>