[bisq-network/bisq] Add null check (#2412)

Christoph Atteneder notifications at github.com
Wed Feb 13 09:19:57 UTC 2019


ripcurlx approved this pull request.

utACK - besides the optional changes suggested.
Having false for the case that minAmount is null is fine as there is a check for null that syncs the minAmount.
https://github.com/bisq-network/bisq/blob/2cbcf77a9e1fd9c14cfd7ec064d8d18ae66a75ba/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java#L1037-L1042

> @@ -732,16 +732,17 @@ public void onFocusOutMinAmountTextField(boolean oldValue, boolean newValue) {
             InputValidator.ValidationResult result = isBtcInputValid(minAmount.get());
             minAmountValidationResult.set(result);
             if (result.isValid) {
-                syncMinAmountWithAmount = dataModel.getMinAmount().getValue().equals(dataModel.getAmount().getValue());
+                Coin minAmount = dataModel.getMinAmount().get();

Not sure if it is a good idea to name it the same as the class field. Makes it a little bit hard to read with this.minAmount/minAmount.

-- 
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/2412#pullrequestreview-203093179
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190213/2794c062/attachment.html>


More information about the bisq-github mailing list