From e4714aab89130b0f66228e6b7ae80a6da9f0382b Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 24 Jan 2025 09:04:48 -0500 Subject: [PATCH] display N/A for buyer contact in seller step 2 form --- .../haveno/desktop/components/paymentmethods/F2FForm.java | 6 +++--- .../portfolio/pendingtrades/steps/buyer/BuyerStep2View.java | 2 +- .../pendingtrades/steps/seller/SellerStep2View.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/components/paymentmethods/F2FForm.java b/desktop/src/main/java/haveno/desktop/components/paymentmethods/F2FForm.java index ada24a71d4..aebd470d31 100644 --- a/desktop/src/main/java/haveno/desktop/components/paymentmethods/F2FForm.java +++ b/desktop/src/main/java/haveno/desktop/components/paymentmethods/F2FForm.java @@ -52,15 +52,15 @@ public class F2FForm extends PaymentMethodForm { private final F2FValidator f2fValidator; private Country selectedCountry; - public static int addFormForBuyer(GridPane gridPane, int gridRow, - PaymentAccountPayload paymentAccountPayload, Offer offer, double top) { + public static int addStep2Form(GridPane gridPane, int gridRow, + PaymentAccountPayload paymentAccountPayload, Offer offer, double top, boolean isBuyer) { F2FAccountPayload f2fAccountPayload = (F2FAccountPayload) paymentAccountPayload; addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, 0, Res.get("shared.country"), CountryUtil.getNameAndCode(f2fAccountPayload.getCountryCode()), top); addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.f2f.city"), offer.getF2FCity(), top); addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.f2f.contact"), - f2fAccountPayload.getContact()); + isBuyer ? f2fAccountPayload.getContact() : Res.get("shared.na")); TextArea textArea = addTopLabelTextArea(gridPane, gridRow, 1, Res.get("payment.shared.extraInfo"), "").second; textArea.setMinHeight(70); textArea.setEditable(false); diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index e36cba49d4..3872ef85ab 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -326,7 +326,7 @@ public class BuyerStep2View extends TradeStepView { case PaymentMethod.F2F_ID: checkNotNull(model.dataModel.getTrade(), "model.dataModel.getTrade() must not be null"); checkNotNull(model.dataModel.getTrade().getOffer(), "model.dataModel.getTrade().getOffer() must not be null"); - gridRow = F2FForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload, model.dataModel.getTrade().getOffer(), 0); + gridRow = F2FForm.addStep2Form(gridPane, gridRow, paymentAccountPayload, model.dataModel.getTrade().getOffer(), 0, true); break; case PaymentMethod.BLOCK_CHAINS_ID: case PaymentMethod.BLOCK_CHAINS_INSTANT_ID: diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java index 06ceba45a2..e9905c3f82 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java @@ -46,8 +46,8 @@ public class SellerStep2View extends TradeStepView { if (model.dataModel.getSellersPaymentAccountPayload() instanceof F2FAccountPayload) { addTitledGroupBg(gridPane, ++gridRow, 4, Res.get("portfolio.pending.step2_seller.f2fInfo.headline"), Layout.COMPACT_GROUP_DISTANCE); - gridRow = F2FForm.addFormForBuyer(gridPane, --gridRow, model.dataModel.getSellersPaymentAccountPayload(), - model.dataModel.getTrade().getOffer(), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE); + gridRow = F2FForm.addStep2Form(gridPane, --gridRow, model.dataModel.getSellersPaymentAccountPayload(), + model.dataModel.getTrade().getOffer(), Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE, false); } }