mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-06 13:44:23 -04:00
rename splitOutput to reserveExactAmount
This commit is contained in:
parent
242bc0e3bb
commit
426d25f78c
13 changed files with 42 additions and 42 deletions
|
@ -129,7 +129,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
@Getter
|
||||
protected long triggerPrice;
|
||||
@Getter
|
||||
protected boolean splitOutput;
|
||||
protected boolean reserveExactAmount;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -167,7 +167,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
shortOfferId = Utilities.getShortId(offerId);
|
||||
addressEntry = xmrWalletService.getOrCreateAddressEntry(offerId, XmrAddressEntry.Context.OFFER_FUNDING);
|
||||
|
||||
splitOutput = preferences.getSplitOfferOutput();
|
||||
reserveExactAmount = preferences.getSplitOfferOutput();
|
||||
|
||||
useMarketBasedPrice.set(preferences.isUsePercentageBasedPrice());
|
||||
buyerSecurityDepositPct.set(Restrictions.getMinBuyerSecurityDepositAsPercent());
|
||||
|
@ -299,7 +299,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
openOfferManager.placeOffer(offer,
|
||||
useSavingsWallet,
|
||||
triggerPrice,
|
||||
splitOutput,
|
||||
reserveExactAmount,
|
||||
resultHandler,
|
||||
errorMessageHandler);
|
||||
}
|
||||
|
@ -682,8 +682,8 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
this.triggerPrice = triggerPrice;
|
||||
}
|
||||
|
||||
public void setSplitOutput(boolean splitOutput) {
|
||||
this.splitOutput = splitOutput;
|
||||
public void setReserveExactAmount(boolean reserveExactAmount) {
|
||||
this.reserveExactAmount = reserveExactAmount;
|
||||
}
|
||||
|
||||
public boolean isUsingRoundedAtmCashAccount() {
|
||||
|
|
|
@ -136,7 +136,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
private TextField currencyTextField;
|
||||
private AddressTextField addressTextField;
|
||||
private BalanceTextField balanceTextField;
|
||||
private CheckBox splitOutputCheckbox;
|
||||
private CheckBox reserveExactAmountCheckbox;
|
||||
private FundsTextField totalToPayTextField;
|
||||
private Label amountDescriptionLabel, priceCurrencyLabel, priceDescriptionLabel, volumeDescriptionLabel,
|
||||
waitingForFundsLabel, marketBasedPriceLabel, percentagePriceDescriptionLabel, tradeFeeDescriptionLabel,
|
||||
|
@ -421,7 +421,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
qrCodeImageView.setVisible(true);
|
||||
balanceTextField.setVisible(true);
|
||||
cancelButton2.setVisible(true);
|
||||
splitOutputCheckbox.setVisible(true);
|
||||
reserveExactAmountCheckbox.setVisible(true);
|
||||
}
|
||||
|
||||
private void updateOfferElementsStyle() {
|
||||
|
@ -1093,18 +1093,18 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
Res.get("shared.tradeWalletBalance"));
|
||||
balanceTextField.setVisible(false);
|
||||
|
||||
splitOutputCheckbox = FormBuilder.addLabelCheckBox(gridPane, ++gridRow,
|
||||
reserveExactAmountCheckbox = FormBuilder.addLabelCheckBox(gridPane, ++gridRow,
|
||||
Res.get("shared.reserveExactAmount"));
|
||||
|
||||
GridPane.setHalignment(splitOutputCheckbox, HPos.LEFT);
|
||||
GridPane.setHalignment(reserveExactAmountCheckbox, HPos.LEFT);
|
||||
|
||||
splitOutputCheckbox.setVisible(false);
|
||||
splitOutputCheckbox.setSelected(preferences.getSplitOfferOutput());
|
||||
splitOutputCheckbox.setOnAction(event -> {
|
||||
boolean selected = splitOutputCheckbox.isSelected();
|
||||
reserveExactAmountCheckbox.setVisible(false);
|
||||
reserveExactAmountCheckbox.setSelected(preferences.getSplitOfferOutput());
|
||||
reserveExactAmountCheckbox.setOnAction(event -> {
|
||||
boolean selected = reserveExactAmountCheckbox.isSelected();
|
||||
if (selected != preferences.getSplitOfferOutput()) {
|
||||
preferences.setSplitOfferOutput(selected);
|
||||
model.dataModel.setSplitOutput(selected);
|
||||
model.dataModel.setReserveExactAmount(selected);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
|||
// If we would change the price representation in the domain we would not be backward compatible
|
||||
public final StringProperty price = new SimpleStringProperty();
|
||||
public final StringProperty triggerPrice = new SimpleStringProperty("");
|
||||
public final BooleanProperty splitOutput = new SimpleBooleanProperty(true);
|
||||
public final BooleanProperty reserveExactAmount = new SimpleBooleanProperty(true);
|
||||
final StringProperty tradeFee = new SimpleStringProperty();
|
||||
final StringProperty tradeFeeInXmrWithFiat = new SimpleStringProperty();
|
||||
final StringProperty tradeFeeCurrencyCode = new SimpleStringProperty();
|
||||
|
@ -779,8 +779,8 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
|||
}
|
||||
}
|
||||
|
||||
public void onSplitOutputCheckboxChanged() {
|
||||
dataModel.setSplitOutput(splitOutput.get());
|
||||
public void onReserveExactAmountCheckboxChanged() {
|
||||
dataModel.setReserveExactAmount(reserveExactAmount.get());
|
||||
}
|
||||
|
||||
void onFixPriceToggleChange(boolean fixedPriceSelected) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class EditOfferViewModel extends MutableOfferViewModel<EditOfferDataModel> {
|
|||
triggerPrice.set("");
|
||||
}
|
||||
onTriggerPriceTextFieldChanged();
|
||||
onSplitOutputCheckboxChanged();
|
||||
onReserveExactAmountCheckboxChanged();
|
||||
}
|
||||
|
||||
public void applyOpenOffer(OpenOffer openOffer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue