mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 03:59:22 +00:00
fix inverted buy/sell label on make or take crypto offer
This commit is contained in:
parent
c9e992442c
commit
264cb5f0ac
2 changed files with 9 additions and 9 deletions
|
@ -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 a new issue