diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index ee29ba9c446..41ad4426ad0 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -101,6 +101,8 @@ import bisq.core.payment.payload.MoneyGramAccountPayload; import bisq.core.payment.payload.PaymentAccountPayload; import bisq.core.payment.payload.PaymentMethod; +import bisq.core.payment.payload.SepaAccountPayload; +import bisq.core.payment.payload.SepaInstantAccountPayload; import bisq.core.payment.payload.SwiftAccountPayload; import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload; import bisq.core.payment.payload.WesternUnionAccountPayload; @@ -243,9 +245,17 @@ protected void addContent() { int rowSpanStart = gridRow; PaymentAccountPayload paymentAccountPayload = model.dataModel.getSellersPaymentAccountPayload(); + PaymentAccountPayload buyersPaymentAccountPayload = model.dataModel.getBuyersPaymentAccountPayload(); String paymentMethodId = paymentAccountPayload != null ? paymentAccountPayload.getPaymentMethodId() : ""; + + // consider special case where we might need to show buyer's (instead of seller's) payment method ID + String paymentMethodIdToDisplay = buyersPaymentAccountPayload instanceof SepaAccountPayload + && paymentAccountPayload instanceof SepaInstantAccountPayload ? + buyersPaymentAccountPayload.getPaymentMethodId() : + paymentMethodId; + TitledGroupBg accountTitledGroupBg = addTitledGroupBg(gridPane, ++gridRow, 4, - Res.get("portfolio.pending.step2_buyer.startPaymentUsing", Res.get(paymentMethodId)), + Res.get("portfolio.pending.step2_buyer.startPaymentUsing", Res.get(paymentMethodIdToDisplay)), Layout.COMPACT_GROUP_DISTANCE); GridPane.setColumnSpan(accountTitledGroupBg, 2); @@ -425,7 +435,6 @@ protected void addContent() { Offer offer = trade.getOffer(); List possiblePaymentAccounts = PaymentAccountUtil.getPossiblePaymentAccounts(offer, model.getUser().getPaymentAccounts(), model.dataModel.getAccountAgeWitnessService()); - PaymentAccountPayload buyersPaymentAccountPayload = model.dataModel.getBuyersPaymentAccountPayload(); if (buyersPaymentAccountPayload != null && possiblePaymentAccounts.size() > 1) { String id = buyersPaymentAccountPayload.getId(); possiblePaymentAccounts.stream()