[bisq-network/bisq] Add missing check for mandatory bsq output (#2614)

Manfred Karrer notifications at github.com
Wed Apr 3 00:26:56 UTC 2019


ManfredKarrer commented on this pull request.



> @@ -550,10 +554,19 @@ private void addInputsAndChangeOutputForTx(Transaction tx, Coin fee, BsqCoinSele
         try {
             // TODO why is fee passed to getChange ???
             Coin change = bsqCoinSelector.getChange(fee, coinSelection);
+            if (requireChangeOutput) {
+                checkArgument(change.isPositive(),
+                        "This transaction requires a mandatory BSQ change output. " +
+                                "You are missing " + Restrictions.getMinNonDustOutput().value / 100d +
+                                " BSQ for a non dust change output.");

Renamed it and use getMessage in the error handler for the popup so at least the expection class is not displayed... Still should be handled more userfriendly on the UI side...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2614#discussion_r271543323
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190402/f1aba0ce/attachment.html>


More information about the bisq-github mailing list