display N/A for buyer contact in seller step 2 form

This commit is contained in:
woodser 2025-01-24 09:04:48 -05:00
parent 0d2c1fe8fd
commit e4714aab89
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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:

View File

@ -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);
}
}