mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Show buyer/seller in terms of BTC
This commit is contained in:
parent
d671b6805a
commit
d5cccfaa66
@ -157,7 +157,7 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
||||
DisplayUtils.formatDateTime(offer.getDate()) + " / " + DisplayUtils.formatDateTime(dispute.getTradeDate()));
|
||||
String currencyCode = offer.getCurrencyCode();
|
||||
addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("shared.offerType"),
|
||||
DisplayUtils.getDirectionBothSides(offer.getDirection(), currencyCode));
|
||||
DisplayUtils.getDirectionBothSides(offer.getDirection()));
|
||||
addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("shared.tradePrice"),
|
||||
FormattingUtils.formatPrice(contract.getTradePrice()));
|
||||
addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("shared.tradeAmount"),
|
||||
|
@ -203,7 +203,7 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
||||
btcDirectionInfo = direction == OfferDirection.BUY ? toReceive : toSpend;
|
||||
} else {
|
||||
addConfirmationLabelLabel(gridPane, rowIndex, offerTypeLabel,
|
||||
DisplayUtils.getDirectionBothSides(direction, currencyCode), firstRowDistance);
|
||||
DisplayUtils.getDirectionBothSides(direction), firstRowDistance);
|
||||
}
|
||||
String btcAmount = Res.get("shared.btcAmount");
|
||||
if (takeOfferHandlerOptional.isPresent()) {
|
||||
|
@ -97,17 +97,11 @@ public class DisplayUtils {
|
||||
return (direction == OfferDirection.SELL) ? Res.get("shared.buyCurrency", currencyCode) : Res.get("shared.sellCurrency", currencyCode);
|
||||
}
|
||||
|
||||
public static String getDirectionBothSides(OfferDirection direction, String currencyCode) {
|
||||
if (CurrencyUtil.isFiatCurrency(currencyCode)) {
|
||||
currencyCode = Res.getBaseCurrencyCode();
|
||||
return direction == OfferDirection.BUY ?
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.buyer"), currencyCode, Res.get("shared.seller")) :
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.seller"), currencyCode, Res.get("shared.buyer"));
|
||||
} else {
|
||||
return direction == OfferDirection.SELL ?
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.buyer"), currencyCode, Res.get("shared.seller")) :
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.seller"), currencyCode, Res.get("shared.buyer"));
|
||||
}
|
||||
public static String getDirectionBothSides(OfferDirection direction) {
|
||||
String currencyCode = Res.getBaseCurrencyCode();
|
||||
return direction == OfferDirection.BUY ?
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.buyer"), currencyCode, Res.get("shared.seller")) :
|
||||
Res.get("formatter.makerTaker", currencyCode, Res.get("shared.seller"), currencyCode, Res.get("shared.buyer"));
|
||||
}
|
||||
|
||||
public static String getDirectionForBuyer(boolean isMyOffer, String currencyCode) {
|
||||
|
Loading…
Reference in New Issue
Block a user