From 38e910c366f512e92a8f356bb99c27e69d858f7b Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 22 Sep 2018 18:59:15 -0500 Subject: [PATCH] Add contact info for seller in case of aa F2F trade Fixes: https://github.com/bisq-network/bisq/issues/1707#issuecomment-423724283 --- .../resources/i18n/displayStrings.properties | 3 ++- .../components/paymentmethods/F2FForm.java | 4 ++-- .../steps/buyer/BuyerStep2View.java | 2 +- .../steps/seller/SellerStep2View.java | 20 ++++++++++++++++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 8a9291db80d..8264b2fc647 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -531,7 +531,7 @@ portfolio.pending.step2_buyer.halCashInfo.headline=Send HalCash code portfolio.pending.step2_buyer.halCashInfo.msg=You need to send a text message with the HalCash code as well as the \ trade ID ({0}) to the BTC seller.\nThe seller''s mobile nr. is {1}.\n\n\ Did you send the code to the seller? -portfolio.pending.step2_buyer.fasterPaymentsHolderNameInfo=Some banks might require the receivers name. \ +portfolio.pending.step2_buyer.fasterPaymentsHolderNameInfo=Some banks might require the receiver's name. \ The UK sort code and account number is sufficient for a Faster Payment transfer and the receivers name is not verified \ by any of the banks. portfolio.pending.step2_buyer.confirmStart.headline=Confirm that you have started the payment @@ -539,6 +539,7 @@ portfolio.pending.step2_buyer.confirmStart.msg=Did you initiate the {0} payment portfolio.pending.step2_buyer.confirmStart.yes=Yes, I have started the payment portfolio.pending.step2_seller.waitPayment.headline=Wait for payment +portfolio.pending.step2_seller.f2fInfo.headline=Buyer's contact information portfolio.pending.step2_seller.waitPayment.msg=The deposit transaction has at least one blockchain confirmation.\nYou need to wait until the BTC buyer starts the {0} payment. portfolio.pending.step2_seller.warn=The BTC buyer still has not done the {0} payment.\nYou need to wait until he starts the payment.\nIf the trade has not been completed on {1} the arbitrator will investigate. portfolio.pending.step2_seller.openForDispute=The BTC buyer has not started his payment!\nThe max. allowed period for the trade has elapsed.\nYou can wait longer and give the trading peer more time or contact the arbitrator for opening a dispute. diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java index db62e3bd2ee..0f30de2e4c8 100644 --- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java +++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java @@ -59,10 +59,10 @@ public class F2FForm extends PaymentMethodForm { private Country selectedCountry; public static int addFormForBuyer(GridPane gridPane, int gridRow, - PaymentAccountPayload paymentAccountPayload, Offer offer) { + PaymentAccountPayload paymentAccountPayload, Offer offer, double top) { F2FAccountPayload f2fAccountPayload = (F2FAccountPayload) paymentAccountPayload; addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("shared.country"), - CountryUtil.getNameAndCode(f2fAccountPayload.getCountryCode())); + CountryUtil.getNameAndCode(f2fAccountPayload.getCountryCode()), top); addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("payment.f2f.contact"), f2fAccountPayload.getContact()); addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("payment.f2f.city"), 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 937def2091a..a044eef5aef 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 @@ -269,7 +269,7 @@ protected void addContent() { break; case PaymentMethod.F2F_ID: checkNotNull(model.dataModel.getTrade().getOffer(), "model.dataModel.getTrade().getOffer() must not be null"); - gridRow = F2FForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload, model.dataModel.getTrade().getOffer()); + gridRow = F2FForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload, model.dataModel.getTrade().getOffer(), 0); break; case PaymentMethod.BLOCK_CHAINS_ID: String labelTitle = Res.get("portfolio.pending.step2_buyer.sellersAddress", diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java index 85024456197..a5f7b9d7381 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep2View.java @@ -17,10 +17,14 @@ package bisq.desktop.main.portfolio.pendingtrades.steps.seller; +import bisq.desktop.components.paymentmethods.F2FForm; import bisq.desktop.main.portfolio.pendingtrades.PendingTradesViewModel; import bisq.desktop.main.portfolio.pendingtrades.steps.TradeStepView; +import bisq.desktop.util.FormBuilder; +import bisq.desktop.util.Layout; import bisq.core.locale.Res; +import bisq.core.payment.payload.F2FAccountPayload; public class SellerStep2View extends TradeStepView { @@ -32,6 +36,19 @@ public SellerStep2View(PendingTradesViewModel model) { super(model); } + @Override + protected void addContent() { + addTradeInfoBlock(); + addInfoBlock(); + if (model.dataModel.getSellersPaymentAccountPayload() instanceof F2FAccountPayload) { + FormBuilder.addTitledGroupBg(gridPane, ++gridRow, 4, + Res.get("portfolio.pending.step2_seller.f2fInfo.headline"), Layout.GROUP_DISTANCE); + gridRow = F2FForm.addFormForBuyer(gridPane, --gridRow, model.dataModel.getSellersPaymentAccountPayload(), + model.dataModel.getTrade().getOffer(), Layout.FIRST_ROW_AND_GROUP_DISTANCE); + } + } + + /////////////////////////////////////////////////////////////////////////////////////////// // Info /////////////////////////////////////////////////////////////////////////////////////////// @@ -46,6 +63,7 @@ protected String getInfoText() { return Res.get("portfolio.pending.step2_seller.waitPayment.msg", model.dataModel.getCurrencyCode()); } + /////////////////////////////////////////////////////////////////////////////////////////// // Warning /////////////////////////////////////////////////////////////////////////////////////////// @@ -58,6 +76,7 @@ protected String getWarningText() { model.getDateForOpenDispute()); } + /////////////////////////////////////////////////////////////////////////////////////////// // Dispute /////////////////////////////////////////////////////////////////////////////////////////// @@ -70,7 +89,6 @@ protected String getOpenForDisputeText() { @Override protected void applyOnDisputeOpened() { } - }