[bisq-network/bisq] Add missing check for mandatory bsq output (#2614)
Manfred Karrer
notifications at github.com
Tue Apr 2 13:01:45 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.");
Better would be an input validation where a more user friendly and translated error is shown (at text field validation).
--
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_r271290565
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190402/f981e283/attachment.html>
More information about the bisq-github
mailing list