mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-12-03 16:33:32 +01:00
fix inverted buy/sell label on make or take crypto offer
This commit is contained in:
parent
c9e992442c
commit
264cb5f0ac
@ -308,7 +308,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
||||
if (CurrencyUtil.isTraditionalCurrency(tradeCurrency.getCode())) {
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButton", Res.get("shared.buy"));
|
||||
} else {
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.buy"), tradeCurrency.getCode());
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.sell"), tradeCurrency.getCode());
|
||||
}
|
||||
nextButton.setId("buy-button");
|
||||
fundFromSavingsWalletButton.setId("buy-button");
|
||||
@ -317,7 +317,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
||||
if (CurrencyUtil.isTraditionalCurrency(tradeCurrency.getCode())) {
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButton", Res.get("shared.sell"));
|
||||
} else {
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.sell"), tradeCurrency.getCode());
|
||||
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.buy"), tradeCurrency.getCode());
|
||||
}
|
||||
nextButton.setId("sell-button");
|
||||
fundFromSavingsWalletButton.setId("sell-button");
|
||||
@ -707,10 +707,10 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
||||
triggerPriceInputTextField.clear();
|
||||
if (!CurrencyUtil.isTraditionalCurrency(newValue)) {
|
||||
if (model.isShownAsBuyOffer()) {
|
||||
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.buy"),
|
||||
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.sell"),
|
||||
model.getTradeCurrency().getCode()));
|
||||
} else {
|
||||
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.sell"),
|
||||
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonCrypto", Res.get("shared.buy"),
|
||||
model.getTradeCurrency().getCode()));
|
||||
}
|
||||
}
|
||||
|
@ -306,12 +306,12 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
takeOfferButton.setId("buy-button-big");
|
||||
nextButton.setId("buy-button");
|
||||
fundFromSavingsWalletButton.setId("buy-button");
|
||||
takeOfferButton.updateText(getTakeOfferLabel(offer, Res.get("shared.buy")));
|
||||
takeOfferButton.updateText(getTakeOfferLabel(offer, false));
|
||||
} else {
|
||||
takeOfferButton.setId("sell-button-big");
|
||||
nextButton.setId("sell-button");
|
||||
fundFromSavingsWalletButton.setId("sell-button");
|
||||
takeOfferButton.updateText(getTakeOfferLabel(offer, Res.get("shared.sell")));
|
||||
takeOfferButton.updateText(getTakeOfferLabel(offer, true));
|
||||
}
|
||||
priceAsPercentageDescription.setText(model.getPercentagePriceDescription());
|
||||
|
||||
@ -1232,11 +1232,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String getTakeOfferLabel(Offer offer, String direction) {
|
||||
private String getTakeOfferLabel(Offer offer, boolean isBuyOffer) {
|
||||
return offer.isTraditionalOffer() ?
|
||||
Res.get("takeOffer.takeOfferButton", direction) :
|
||||
Res.get("takeOffer.takeOfferButton", isBuyOffer ? Res.get("shared.sell") : Res.get("shared.buy")) :
|
||||
Res.get("takeOffer.takeOfferButtonCrypto",
|
||||
direction,
|
||||
isBuyOffer ? Res.get("shared.buy") : Res.get("shared.sell"),
|
||||
offer.getCurrencyCode());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user