Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve navigation structure #6135

Merged
merged 35 commits into from Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
98f355d
Adapt navigational structure and offerbook handling to buy and sell d…
ripcurlx Apr 1, 2022
875e5f4
Adapt offer book chart view to new navigational structure
ripcurlx Apr 1, 2022
5781e3b
Add payment account filtering for remaining payment methods
ripcurlx Apr 1, 2022
810a29b
Add missing payment account filtering
ripcurlx Apr 1, 2022
e3ceb80
Show all payment methods
ripcurlx Apr 1, 2022
924e92a
Adapt take offer process to new navigation structure
ripcurlx Apr 4, 2022
a8189d7
Adapt create offer process to new navigation structure
ripcurlx Apr 6, 2022
497158a
Fix rebase errors with master
ripcurlx Apr 7, 2022
33725c2
Adapt navigation labels back to currency code
ripcurlx Apr 8, 2022
b70d102
Fix BSQ swap labels
ripcurlx Apr 8, 2022
98285da
Move OfferViewUtil
ripcurlx Apr 11, 2022
b734420
Fix navigation to specific offer book view
ripcurlx Apr 11, 2022
5b67766
Properly rename main navigation
ripcurlx Apr 11, 2022
1712f74
Use BSQ Swap as default when BSQ offer is created
ripcurlx Apr 11, 2022
492ff35
Adapt amount and volume description for take offer
ripcurlx Apr 11, 2022
63ea054
Adapt amount and volume description for create offer
ripcurlx Apr 11, 2022
9a3ed33
Use Offer.isFiat helper method
ripcurlx Apr 11, 2022
542cc4d
Remove close button duplication in DetailsWindows
ripcurlx Apr 11, 2022
098ece2
Only show BSQ accounts
ripcurlx Apr 11, 2022
2055cc5
Fix wrong check to show BSQ swap as default for create offer
ripcurlx Apr 11, 2022
fce247c
Fix a couple of issues regarding default currencies
ripcurlx Apr 13, 2022
348d147
Fix broken option for BSQ Altcoin and BSQ Altcoin Instant
ripcurlx Apr 19, 2022
e43bad1
Fix offer count for Altcoins
ripcurlx Apr 19, 2022
d41235c
Fix storage of crypto screen currency
ripcurlx Apr 19, 2022
be16166
Fix sorting issue for Altcoins
ripcurlx Apr 20, 2022
7ecd159
Fix BSQ swap create offer handling (again)
ripcurlx Apr 20, 2022
108255b
Move supported currencies into payment accounts
ripcurlx Apr 20, 2022
e43a8ae
Fix handling of preferred currency
ripcurlx Apr 20, 2022
0894037
Add safeguard for already stored crypto currencies in preferences by …
ripcurlx Apr 20, 2022
89926d1
Improve help icon
ripcurlx Apr 20, 2022
3ce374e
Unify tab handling
ripcurlx Apr 21, 2022
2233f73
Fix Codacy complaints
ripcurlx Apr 21, 2022
4ce861a
Add create and take offer title
ripcurlx Apr 22, 2022
4447435
Switch to open offers after creating a new offer
ripcurlx Apr 22, 2022
7ad2dd0
Set preferred currency as top altcoin
ripcurlx Apr 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings.properties
Expand Up @@ -198,6 +198,7 @@ shared.openURL=Open {0}
shared.fiat=Fiat
shared.crypto=Crypto
shared.otherAssets=other assets
shared.other=Other
shared.all=All
shared.edit=Edit
shared.advancedOptions=Advanced options
Expand Down Expand Up @@ -383,7 +384,6 @@ offerbook.createNewOffer=Create new offer to {0} {1}
offerbook.createOfferDisabled.tooltip=You can only create one offer at a time

offerbook.takeOfferButton.tooltip=Take offer for {0}
offerbook.yesCreateOffer=Yes, create offer
offerbook.setupNewAccount=Set up a new trading account
offerbook.removeOffer.success=Remove offer was successful.
offerbook.removeOffer.failed=Remove offer failed:\n{0}
Expand Down
Expand Up @@ -22,7 +22,6 @@
import bisq.desktop.common.view.ViewLoader;

import bisq.core.offer.OfferDirection;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.user.Preferences;
import bisq.core.user.User;

Expand All @@ -37,7 +36,6 @@ public class BuyOfferView extends OfferView {
public BuyOfferView(ViewLoader viewLoader,
Navigation navigation,
Preferences preferences,
ArbitratorManager arbitratorManager,
User user,
P2PService p2PService) {
super(viewLoader,
Expand Down
16 changes: 9 additions & 7 deletions desktop/src/main/java/bisq/desktop/main/offer/OfferView.java
Expand Up @@ -22,6 +22,7 @@
import bisq.desktop.common.view.View;
import bisq.desktop.common.view.ViewLoader;
import bisq.desktop.main.MainView;
import bisq.desktop.main.offer.bisq_v1.OfferViewUtil;
import bisq.desktop.main.offer.bisq_v1.createoffer.CreateOfferView;
import bisq.desktop.main.offer.bisq_v1.takeoffer.TakeOfferView;
import bisq.desktop.main.offer.bsq_swap.create_offer.BsqSwapCreateOfferView;
Expand All @@ -31,13 +32,13 @@
import bisq.desktop.main.offer.offerbook.BtcOfferBookView;
import bisq.desktop.main.offer.offerbook.OfferBookView;
import bisq.desktop.main.offer.offerbook.OtherOfferBookView;
import bisq.desktop.main.offer.offerbook.OtherOfferBookViewModel;
import bisq.desktop.main.offer.offerbook.TopAltcoinOfferBookView;
import bisq.desktop.main.offer.offerbook.TopAltcoinOfferBookViewModel;
import bisq.desktop.util.GUIUtil;

import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.GlobalSettings;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferDirection;
Expand Down Expand Up @@ -205,6 +206,7 @@ private void loadView(Class<? extends View> viewClass,
} else if (data instanceof BsqSwapOfferPayload) {
loadCreateViewClass(bsqOfferBookView, viewClass, childViewClass, bsqOfferBookTab, PaymentMethod.BSQ_SWAP, (BsqSwapOfferPayload) data);
} else {
tradeCurrency = BsqOfferBookViewModel.BSQ;
loadCreateViewClass(bsqOfferBookView, viewClass, childViewClass, bsqOfferBookTab, (PaymentMethod) data, null);
}
tabPane.getSelectionModel().select(bsqOfferBookTab);
Expand All @@ -214,6 +216,7 @@ private void loadView(Class<? extends View> viewClass,
} else if (childViewClass == TakeOfferView.class) {
loadTakeViewClass(viewClass, childViewClass, topAltcoinOfferBookTab);
} else {
tradeCurrency = TopAltcoinOfferBookViewModel.TOP_ALTCOIN;
loadCreateViewClass(topAltcoinOfferBookView, viewClass, childViewClass, topAltcoinOfferBookTab, (PaymentMethod) data, null);
}
tabPane.getSelectionModel().select(topAltcoinOfferBookTab);
Expand All @@ -228,21 +231,20 @@ private void loadView(Class<? extends View> viewClass,
Optional<TradeCurrency> tradeCurrencyOptional = (this.direction == OfferDirection.SELL) ?
CurrencyUtil.getTradeCurrency(preferences.getSellScreenCryptoCurrencyCode()) :
CurrencyUtil.getTradeCurrency(preferences.getBuyScreenCryptoCurrencyCode());
tradeCurrency = tradeCurrencyOptional.isEmpty() ? OtherOfferBookViewModel.DEFAULT_ALTCOIN : tradeCurrencyOptional.get();
tradeCurrency = tradeCurrencyOptional.isEmpty() ? OfferViewUtil.getAnyOfMainCryptoCurrencies() : tradeCurrencyOptional.get();
}
loadCreateViewClass(otherOfferBookView, viewClass, childViewClass, otherOfferBookTab, (PaymentMethod) data, null);
}
tabPane.getSelectionModel().select(otherOfferBookTab);
} else {
if (btcOfferBookTab == null) {
//TODO: use naming from currencies or from translations
btcOfferBookTab = new Tab("BITCOIN");
btcOfferBookTab = new Tab(Res.getBaseCurrencyName().toUpperCase());
btcOfferBookTab.setClosable(false);
bsqOfferBookTab = new Tab("BSQ");
bsqOfferBookTab = new Tab(BsqOfferBookViewModel.BSQ.getCode());
bsqOfferBookTab.setClosable(false);
topAltcoinOfferBookTab = new Tab("MONERO");
topAltcoinOfferBookTab = new Tab(TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getCode());
topAltcoinOfferBookTab.setClosable(false);
otherOfferBookTab = new Tab("OTHER");
otherOfferBookTab = new Tab(Res.get("shared.other").toUpperCase());
otherOfferBookTab.setClosable(false);

tabPane.getTabs().addAll(btcOfferBookTab, bsqOfferBookTab, topAltcoinOfferBookTab, otherOfferBookTab);
Expand Down
Expand Up @@ -337,7 +337,7 @@ public void initWithData(OfferDirection direction, TradeCurrency tradeCurrency,
if (CurrencyUtil.isFiatCurrency(tradeCurrency.getCode())) {
placeOfferButtonLabel = Res.get("createOffer.placeOfferButton", Res.get("shared.buy"));
} else {
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.buy"), tradeCurrency.getName());
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.buy"), tradeCurrency.getCode());
}
placeOfferButton.updateText(placeOfferButtonLabel);
nextButton.setId("buy-button");
Expand All @@ -347,7 +347,7 @@ public void initWithData(OfferDirection direction, TradeCurrency tradeCurrency,
if (CurrencyUtil.isFiatCurrency(tradeCurrency.getCode())) {
placeOfferButtonLabel = Res.get("createOffer.placeOfferButton", Res.get("shared.sell"));
} else {
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.sell"), tradeCurrency.getName());
placeOfferButtonLabel = Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.sell"), tradeCurrency.getCode());
}
nextButton.setId("sell-button");
fundFromSavingsWalletButton.setId("sell-button");
Expand Down Expand Up @@ -793,10 +793,10 @@ private void createListeners() {
if (!CurrencyUtil.isFiatCurrency(newValue)) {
if (model.isShownAsBuyOffer()) {
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.buy"),
model.getTradeCurrency().getName()));
model.getTradeCurrency().getCode()));
} else {
placeOfferButton.updateText(Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.sell"),
model.getTradeCurrency().getName()));
model.getTradeCurrency().getCode()));
}
}
};
Expand Down
Expand Up @@ -24,6 +24,8 @@
import bisq.desktop.main.MainView;
import bisq.desktop.main.offer.SellOfferView;
import bisq.desktop.main.offer.offerbook.BsqOfferBookView;
import bisq.desktop.main.offer.offerbook.BsqOfferBookViewModel;
import bisq.desktop.main.offer.offerbook.TopAltcoinOfferBookViewModel;
import bisq.desktop.main.overlays.popups.Popup;

import bisq.core.locale.CurrencyUtil;
Expand All @@ -46,6 +48,7 @@
import javafx.geometry.VPos;

import java.util.HashMap;
import java.util.Objects;
import java.util.concurrent.TimeUnit;

// Shared utils for Views
Expand Down Expand Up @@ -133,4 +136,10 @@ public static boolean isShownAsBuyOffer(Offer offer) {
public static boolean isShownAsBuyOffer(OfferDirection direction, TradeCurrency tradeCurrency) {
return !isShownAsSellOffer(tradeCurrency.getCode(), direction);
}

public static TradeCurrency getAnyOfMainCryptoCurrencies() {
return CurrencyUtil.getMainCryptoCurrencies().stream().filter(cryptoCurrency ->
!Objects.equals(cryptoCurrency.getCode(), TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getCode()) &&
!Objects.equals(cryptoCurrency.getCode(), BsqOfferBookViewModel.BSQ.getCode())).findAny().get();
}
}
Expand Up @@ -1351,7 +1351,7 @@ private String getTakeOfferLabel(Offer offer, String direction) {
Res.get("takeOffer.takeOfferButton", direction) :
Res.get("takeOffer.takeOfferButtonAltcoin",
direction,
CurrencyUtil.getNameByCode(offer.getCurrencyCode()));
offer.getCurrencyCode());
}

}
Expand Down
Expand Up @@ -27,7 +27,9 @@
import bisq.desktop.main.MainView;
import bisq.desktop.main.offer.OfferView;
import bisq.desktop.main.offer.SelectableView;
import bisq.desktop.main.offer.bisq_v1.OfferViewUtil;
import bisq.desktop.main.offer.bsq_swap.BsqSwapOfferView;
import bisq.desktop.main.offer.offerbook.BsqOfferBookViewModel;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.main.overlays.windows.BsqSwapOfferDetailsWindow;
import bisq.desktop.main.portfolio.PortfolioView;
Expand Down Expand Up @@ -168,16 +170,21 @@ public void initWithData(OfferDirection direction,
@Nullable BsqSwapOfferPayload offerPayload) {
this.offerActionHandler = offerActionHandler;

model.initWithData(offerPayload != null ? offerPayload.getDirection() : direction, offerPayload);
// Invert direction for non-Fiat trade currencies -> BUY BSQ is to SELL Bitcoin
OfferDirection offerDirection = direction == OfferDirection.BUY ? OfferDirection.SELL : OfferDirection.BUY;

if (model.dataModel.isBuyOffer()) {
model.initWithData(offerPayload != null ? offerPayload.getDirection() : offerDirection, offerPayload);

if (OfferViewUtil.isShownAsBuyOffer(offerDirection, BsqOfferBookViewModel.BSQ)) {
actionButton.setId("buy-button-big");
actionButton.updateText(Res.get("createOffer.placeOfferButton", Res.get("shared.buy")));
volumeDescriptionLabel.setText(Res.get("createOffer.amountPriceBox.buy.volumeDescription", BSQ));
actionButton.updateText(Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.buy"), BSQ));
nextButton.setId("buy-button");
volumeDescriptionLabel.setText(Res.get("createOffer.amountPriceBox.sell.volumeDescription", BSQ));
} else {
actionButton.setId("sell-button-big");
actionButton.updateText(Res.get("createOffer.placeOfferButton", Res.get("shared.sell")));
volumeDescriptionLabel.setText(Res.get("createOffer.amountPriceBox.sell.volumeDescription", BSQ));
actionButton.updateText(Res.get("createOffer.placeOfferButtonAltcoin", Res.get("shared.sell"), BSQ));
nextButton.setId("sell-button");
volumeDescriptionLabel.setText(Res.get("createOffer.amountPriceBox.buy.volumeDescription", BSQ));
}

String amountDescription = Res.get("createOffer.amountPriceBox.amountDescription",
Expand Down
Expand Up @@ -163,8 +163,8 @@ public void initWithData(Offer offer) {
amountDescriptionLabel.setText(Res.get("takeOffer.amountPriceBox.sell.amountDescription"));
} else {
actionButton.setId("sell-button-big");
nextButton.setId("sell-button");
actionButton.updateText(Res.get("takeOffer.takeOfferButtonAltcoin", Res.get("shared.sell"), BSQ));
nextButton.setId("sell-button");
volumeDescriptionLabel.setText(Res.get("createOffer.amountPriceBox.sell.volumeDescription", BSQ));
amountDescriptionLabel.setText(Res.get("takeOffer.amountPriceBox.buy.amountDescription"));
}
Expand Down
Expand Up @@ -58,8 +58,8 @@ public class BsqOfferBookView extends OfferBookView<GridPane, BsqOfferBookViewMo
@Override
protected String getMarketTitle() {
return model.getDirection().equals(OfferDirection.BUY) ?
Res.get("offerbook.availableOffersToBuy", BsqOfferBookViewModel.BSQ.getCode(), Res.getBaseCurrencyName()) :
Res.get("offerbook.availableOffersToSell", BsqOfferBookViewModel.BSQ.getCode(), Res.getBaseCurrencyName());
Res.get("offerbook.availableOffersToBuy", BsqOfferBookViewModel.BSQ.getCode(), Res.getBaseCurrencyCode()) :
Res.get("offerbook.availableOffersToSell", BsqOfferBookViewModel.BSQ.getCode(), Res.getBaseCurrencyCode());
}

@Override
Expand All @@ -73,7 +73,7 @@ protected void activate() {
}

@Override
String getCreateOfferButtonLabel() {
String getTradeCurrencyCode() {
return BsqOfferBookViewModel.BSQ.getCode();
}
}
Expand Up @@ -56,14 +56,14 @@ public class BtcOfferBookView extends OfferBookView<GridPane, BtcOfferBookViewMo
@Override
protected String getMarketTitle() {
return model.getDirection().equals(OfferDirection.BUY) ?
Res.get("offerbook.availableOffersToBuy", Res.getBaseCurrencyName(), Res.get("shared.fiat")) :
Res.get("offerbook.availableOffersToSell", Res.getBaseCurrencyName(), Res.get("shared.fiat"));
Res.get("offerbook.availableOffersToBuy", Res.getBaseCurrencyCode(), Res.get("shared.fiat")) :
Res.get("offerbook.availableOffersToSell", Res.getBaseCurrencyCode(), Res.get("shared.fiat"));


}

@Override
String getCreateOfferButtonLabel() {
return Res.getBaseCurrencyName().toUpperCase();
String getTradeCurrencyCode() {
return Res.getBaseCurrencyCode();
}
}
Expand Up @@ -289,7 +289,7 @@ public void initialize() {
if (price2 == null || price1 == null) {
return 0;
}
if (model.getDirection() == OfferDirection.SELL) {
if (OfferViewUtil.isShownAsSellOffer(model.getSelectedTradeCurrency().getCode(), model.getDirection())) {
return price1.compareTo(price2);
} else {
return price2.compareTo(price1);
Expand Down Expand Up @@ -1292,8 +1292,8 @@ private Region getSpacer() {
private void updateCreateOfferButton() {
createOfferButton.setText(Res.get("offerbook.createNewOffer",
model.getDirection() == OfferDirection.BUY ? Res.get("shared.buy") : Res.get("shared.sell"),
getCreateOfferButtonLabel()).toUpperCase());
getTradeCurrencyCode()).toUpperCase());
}

abstract String getCreateOfferButtonLabel();
abstract String getTradeCurrencyCode();
}
Expand Up @@ -56,12 +56,12 @@ public class OtherOfferBookView extends OfferBookView<GridPane, OtherOfferBookVi
@Override
protected String getMarketTitle() {
return model.getDirection().equals(OfferDirection.BUY) ?
Res.get("offerbook.availableOffersToBuy", Res.get("shared.otherAssets"), Res.getBaseCurrencyName()) :
Res.get("offerbook.availableOffersToSell", Res.get("shared.otherAssets"), Res.getBaseCurrencyName());
Res.get("offerbook.availableOffersToBuy", Res.get("shared.otherAssets"), Res.getBaseCurrencyCode()) :
Res.get("offerbook.availableOffersToSell", Res.get("shared.otherAssets"), Res.getBaseCurrencyCode());
}

@Override
String getCreateOfferButtonLabel() {
return model.showAllTradeCurrenciesProperty.get() ? "" : model.getSelectedTradeCurrency().getName();
String getTradeCurrencyCode() {
return model.showAllTradeCurrenciesProperty.get() ? "" : model.getSelectedTradeCurrency().getCode();
}
}
Expand Up @@ -18,6 +18,7 @@
package bisq.desktop.main.offer.offerbook;

import bisq.desktop.Navigation;
import bisq.desktop.main.offer.bisq_v1.OfferViewUtil;
import bisq.desktop.util.GUIUtil;

import bisq.core.account.witness.AccountAgeWitnessService;
Expand Down Expand Up @@ -58,8 +59,6 @@

public class OtherOfferBookViewModel extends OfferBookViewModel {

public static final TradeCurrency DEFAULT_ALTCOIN = CurrencyUtil.getTradeCurrency("ETH").get();

@Inject
public OtherOfferBookViewModel(User user,
OpenOfferManager openOfferManager,
Expand Down Expand Up @@ -133,9 +132,9 @@ Predicate<OfferBookListItem> getCurrencyAndMethodPredicate(OfferDirection direct

@Override
TradeCurrency getDefaultTradeCurrency() {
// select first currency in list, otherwise if view is not initialized add Ether as default one
// select first currency in list, otherwise if view is not initialized any of the main crypto currencies
return !getTradeCurrencies().isEmpty() ? getTradeCurrencies().get(1) :
DEFAULT_ALTCOIN;
OfferViewUtil.getAnyOfMainCryptoCurrencies();
}

@Override
Expand Down
Expand Up @@ -56,8 +56,8 @@ public class TopAltcoinOfferBookView extends OfferBookView<GridPane, TopAltcoinO
@Override
protected String getMarketTitle() {
return model.getDirection().equals(OfferDirection.BUY) ?
Res.get("offerbook.availableOffersToBuy", TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getName(), Res.getBaseCurrencyName()) :
Res.get("offerbook.availableOffersToSell", TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getName(), Res.getBaseCurrencyName());
Res.get("offerbook.availableOffersToBuy", TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getCode(), Res.getBaseCurrencyCode()) :
Res.get("offerbook.availableOffersToSell", TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getCode(), Res.getBaseCurrencyCode());
}

@Override
Expand All @@ -71,7 +71,7 @@ protected void activate() {
}

@Override
String getCreateOfferButtonLabel() {
return TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getName();
String getTradeCurrencyCode() {
return TopAltcoinOfferBookViewModel.TOP_ALTCOIN.getCode();
}
}
Expand Up @@ -24,7 +24,6 @@
import bisq.desktop.util.DisplayUtils;
import bisq.desktop.util.Layout;

import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.monetary.Price;
import bisq.core.monetary.Volume;
Expand Down Expand Up @@ -268,13 +267,13 @@ private void addContent() {
private void addConfirmAndCancelButtons(boolean isPlaceOffer) {
boolean isBuyOffer = OfferViewUtil.isShownAsBuyOffer(offer);
boolean isBuyerRole = isPlaceOffer == isBuyOffer;
String tradeCurrencyByName = CurrencyUtil.getNameByCode(offer.getCurrencyCode());
String tradeCurrencyByCode = offer.getCurrencyCode();
String placeOfferButtonText = isBuyerRole ?
Res.get("offerDetailsWindow.confirm.makerAltcoin", Res.get("shared.buy"), tradeCurrencyByName) :
Res.get("offerDetailsWindow.confirm.makerAltcoin", Res.get("shared.sell"), tradeCurrencyByName);
Res.get("offerDetailsWindow.confirm.makerAltcoin", Res.get("shared.buy"), tradeCurrencyByCode) :
Res.get("offerDetailsWindow.confirm.makerAltcoin", Res.get("shared.sell"), tradeCurrencyByCode);
String takeOfferButtonText = isBuyerRole ?
Res.get("offerDetailsWindow.confirm.takerAltcoin", Res.get("shared.buy"), tradeCurrencyByName) :
Res.get("offerDetailsWindow.confirm.takerAltcoin", Res.get("shared.sell"), tradeCurrencyByName);
Res.get("offerDetailsWindow.confirm.takerAltcoin", Res.get("shared.buy"), tradeCurrencyByCode) :
Res.get("offerDetailsWindow.confirm.takerAltcoin", Res.get("shared.sell"), tradeCurrencyByCode);

ImageView iconView = new ImageView();
iconView.setId(isBuyerRole ? "image-buy-white" : "image-sell-white");
Expand Down