mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-26 16:35:18 -04:00
Fix validation for inputs at create offer screen
This commit is contained in:
parent
528a1dc62e
commit
2e85f855a6
1 changed files with 6 additions and 5 deletions
|
@ -750,10 +750,11 @@ class CreateOfferViewModel extends ActivatableWithDataModel<CreateOfferDataModel
|
||||||
boolean inputDataValid = isBtcInputValid(amount.get()).isValid &&
|
boolean inputDataValid = isBtcInputValid(amount.get()).isValid &&
|
||||||
isBtcInputValid(minAmount.get()).isValid &&
|
isBtcInputValid(minAmount.get()).isValid &&
|
||||||
isFiatInputValid(price.get()).isValid &&
|
isFiatInputValid(price.get()).isValid &&
|
||||||
|
dataModel.priceAsFiat.get() != null &&
|
||||||
|
dataModel.priceAsFiat.get().getValue() != 0 &&
|
||||||
isFiatInputValid(volume.get()).isValid &&
|
isFiatInputValid(volume.get()).isValid &&
|
||||||
dataModel.isMinAmountLessOrEqualAmount() &&
|
dataModel.isMinAmountLessOrEqualAmount();
|
||||||
!dataModel.useMarketBasedPrice.get() || dataModel.getMarketPriceMargin() != 0 &&
|
|
||||||
dataModel.useMarketBasedPrice.get() || (dataModel.priceAsFiat.get() != null && dataModel.priceAsFiat.get().getValue() != 0);
|
|
||||||
isNextButtonDisabled.set(!inputDataValid);
|
isNextButtonDisabled.set(!inputDataValid);
|
||||||
// boolean notSufficientFees = dataModel.isWalletFunded.get() && dataModel.isMainNet.get() && !dataModel.isFeeFromFundingTxSufficient.get();
|
// boolean notSufficientFees = dataModel.isWalletFunded.get() && dataModel.isMainNet.get() && !dataModel.isFeeFromFundingTxSufficient.get();
|
||||||
//isPlaceOfferButtonDisabled.set(createOfferRequested || !inputDataValid || notSufficientFees);
|
//isPlaceOfferButtonDisabled.set(createOfferRequested || !inputDataValid || notSufficientFees);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue