mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Fix validation for inputs at create offer screen
This commit is contained in:
parent
528a1dc62e
commit
2e85f855a6
@ -493,9 +493,9 @@ class CreateOfferViewModel extends ActivatableWithDataModel<CreateOfferDataModel
|
||||
calculateVolume();
|
||||
|
||||
// handle minAmount/amount relationship
|
||||
if (!dataModel.isMinAmountLessOrEqualAmount())
|
||||
if (!dataModel.isMinAmountLessOrEqualAmount())
|
||||
minAmount.set(amount.get());
|
||||
else
|
||||
else
|
||||
amountValidationResult.set(result);
|
||||
|
||||
if (minAmount.get() != null)
|
||||
@ -750,10 +750,11 @@ class CreateOfferViewModel extends ActivatableWithDataModel<CreateOfferDataModel
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user