[bisq-network/bisq] Prevent dust outputs from being created during withdraw from wallet (#4093)

m52go notifications at github.com
Mon Mar 30 13:30:02 UTC 2020

@m52go commented on this pull request.

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

Seems straightforward to me overall.

2 small things.

* [satoshi](https://github.com/bisq-network/bisq/pull/4093/files#diff-ff484a282dd668b4e76956ad0b761971R352) should be plural. It's already pluralized below in the 'required transaction fee' line

* might be nice to change the 2 "transaction fee" mentions to "mining fee" to be more specific and match the text on the 'send funds' screen

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200330/228ab56b/attachment.html>

More information about the bisq-github mailing list