mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Adapt scopes to be able to run existing tests again
This commit is contained in:
parent
238eb08698
commit
1999bc9a99
4 changed files with 14 additions and 11 deletions
|
@ -203,7 +203,7 @@ public abstract class EditableOfferDataModel extends OfferDataModel implements B
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void activate() {
|
||||
public void activate() {
|
||||
addListeners();
|
||||
|
||||
if (isTabSelected)
|
||||
|
@ -237,7 +237,7 @@ public abstract class EditableOfferDataModel extends OfferDataModel implements B
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// called before activate()
|
||||
boolean initWithData(OfferPayload.Direction direction, TradeCurrency tradeCurrency) {
|
||||
public boolean initWithData(OfferPayload.Direction direction, TradeCurrency tradeCurrency) {
|
||||
this.direction = direction;
|
||||
this.tradeCurrency = tradeCurrency;
|
||||
|
||||
|
|
|
@ -101,15 +101,15 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
private final String paymentLabel;
|
||||
private boolean createOfferRequested;
|
||||
|
||||
final StringProperty amount = new SimpleStringProperty();
|
||||
final StringProperty minAmount = new SimpleStringProperty();
|
||||
public final StringProperty amount = new SimpleStringProperty();
|
||||
public final StringProperty minAmount = new SimpleStringProperty();
|
||||
final StringProperty buyerSecurityDeposit = new SimpleStringProperty();
|
||||
final String sellerSecurityDeposit;
|
||||
|
||||
// Price in the viewModel is always dependent on fiat/altcoin: Fiat Fiat/BTC, for altcoins we use inverted price.
|
||||
// The domain (dataModel) uses always the same price model (otherCurrencyBTC)
|
||||
// If we would change the price representation in the domain we would not be backward compatible
|
||||
protected final StringProperty price = new SimpleStringProperty();
|
||||
public final StringProperty price = new SimpleStringProperty();
|
||||
final StringProperty makerFee = new SimpleStringProperty();
|
||||
final StringProperty makerFeeWithCode = new SimpleStringProperty();
|
||||
final StringProperty makerFeeCurrencyCode = new SimpleStringProperty();
|
||||
|
@ -117,8 +117,8 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
// Positive % value means always a better price form the maker's perspective:
|
||||
// Buyer (with fiat): lower price as market
|
||||
// Buyer (with altcoin): higher (display) price as market (display price is inverted)
|
||||
protected final StringProperty marketPriceMargin = new SimpleStringProperty();
|
||||
final StringProperty volume = new SimpleStringProperty();
|
||||
public final StringProperty marketPriceMargin = new SimpleStringProperty();
|
||||
public final StringProperty volume = new SimpleStringProperty();
|
||||
final StringProperty volumeDescriptionLabel = new SimpleStringProperty();
|
||||
final StringProperty volumePromptLabel = new SimpleStringProperty();
|
||||
final StringProperty tradeAmount = new SimpleStringProperty();
|
||||
|
@ -215,7 +215,7 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void activate() {
|
||||
public void activate() {
|
||||
if (DevEnv.isDevMode()) {
|
||||
UserThread.runAfter(() -> {
|
||||
switch (BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode()) {
|
||||
|
@ -687,7 +687,7 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
}
|
||||
}
|
||||
|
||||
void onFocusOutMinAmountTextField(boolean oldValue, boolean newValue) {
|
||||
public void onFocusOutMinAmountTextField(boolean oldValue, boolean newValue) {
|
||||
if (oldValue && !newValue) {
|
||||
InputValidator.ValidationResult result = isBtcInputValid(minAmount.get());
|
||||
minAmountValidationResult.set(result);
|
||||
|
@ -727,7 +727,7 @@ public abstract class EditableOfferViewModel<M extends EditableOfferDataModel> e
|
|||
}
|
||||
}
|
||||
|
||||
void onFocusOutPriceAsPercentageTextField(boolean oldValue, boolean newValue) {
|
||||
public void onFocusOutPriceAsPercentageTextField(boolean oldValue, boolean newValue) {
|
||||
inputIsMarketBasedPrice = !oldValue && newValue;
|
||||
if (oldValue && !newValue)
|
||||
if (marketPriceMargin.get() == null) {
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.google.inject.Inject;
|
|||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
|
||||
|
@ -82,6 +83,8 @@ public class EditOpenOfferView extends EditableOfferView<EditOpenOfferViewModel>
|
|||
hidePaymentGroup();
|
||||
hideOptionsGroup();
|
||||
|
||||
gridPane.setPadding(new Insets(0, 25, -1, 25));
|
||||
|
||||
updateMarketPriceAvailable();
|
||||
updateElementsWithDirection();
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class EditOpenOfferViewModel extends EditableOfferViewModel<EditOpenOfferDataMod
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void activate() {
|
||||
public void activate() {
|
||||
super.activate();
|
||||
dataModel.populateData();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue