Skip to content

Commit

Permalink
Fix validation for inputs at create offer screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfredKarrer committed Apr 30, 2016
1 parent 528a1dc commit 2e85f85
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ void onFocusOutAmountTextField(boolean oldValue, boolean newValue, String userIn
calculateVolume();

// handle minAmount/amount relationship
if (!dataModel.isMinAmountLessOrEqualAmount())
if (!dataModel.isMinAmountLessOrEqualAmount())
minAmount.set(amount.get());
else
else
amountValidationResult.set(result);

if (minAmount.get() != null)
Expand Down Expand Up @@ -750,10 +750,11 @@ private void updateButtonDisableState() {
boolean inputDataValid = isBtcInputValid(amount.get()).isValid &&
isBtcInputValid(minAmount.get()).isValid &&
isFiatInputValid(price.get()).isValid &&
dataModel.priceAsFiat.get() != null &&
dataModel.priceAsFiat.get().getValue() != 0 &&
isFiatInputValid(volume.get()).isValid &&
dataModel.isMinAmountLessOrEqualAmount() &&
!dataModel.useMarketBasedPrice.get() || dataModel.getMarketPriceMargin() != 0 &&
dataModel.useMarketBasedPrice.get() || (dataModel.priceAsFiat.get() != null && dataModel.priceAsFiat.get().getValue() != 0);
dataModel.isMinAmountLessOrEqualAmount();

isNextButtonDisabled.set(!inputDataValid);
// boolean notSufficientFees = dataModel.isWalletFunded.get() && dataModel.isMainNet.get() && !dataModel.isFeeFromFundingTxSufficient.get();
//isPlaceOfferButtonDisabled.set(createOfferRequested || !inputDataValid || notSufficientFees);
Expand Down

0 comments on commit 2e85f85

Please sign in to comment.