Skip to content

Commit 14a17c4

Browse files
committed
show extra info popup on take f2f offer
1 parent 0c442c9 commit 14a17c4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferView.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
162162
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
163163
private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed,
164164
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashAtAtmWarningDisplayed,
165-
australiaPayidWarningDisplayed, paypalWarningDisplayed, cashAppWarningDisplayed;
165+
australiaPayidWarningDisplayed, paypalWarningDisplayed, cashAppWarningDisplayed, F2FWarningDisplayed;
166166
private SimpleBooleanProperty errorPopupDisplayed;
167167
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
168168

@@ -276,6 +276,7 @@ protected void activate() {
276276
maybeShowAustraliaPayidWarning(lastPaymentAccount, model.dataModel.getOffer());
277277
maybeShowPayPalWarning(lastPaymentAccount, model.dataModel.getOffer());
278278
maybeShowCashAppWarning(lastPaymentAccount, model.dataModel.getOffer());
279+
maybeShowF2FWarning(lastPaymentAccount, model.dataModel.getOffer());
279280

280281
if (!model.isRange()) {
281282
nextButton.setVisible(false);
@@ -1235,6 +1236,23 @@ private void maybeShowCashAppWarning(PaymentAccount paymentAccount, Offer offer)
12351236
}
12361237
}
12371238

1239+
private void maybeShowF2FWarning(PaymentAccount paymentAccount, Offer offer) {
1240+
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.F2F_ID) &&
1241+
!F2FWarningDisplayed && !offer.getExtraInfo().isEmpty()) {
1242+
F2FWarningDisplayed = true;
1243+
UserThread.runAfter(() -> {
1244+
new GenericMessageWindow()
1245+
.preamble(Res.get("payment.tradingRestrictions"))
1246+
.instruction(offer.getExtraInfo())
1247+
.actionButtonText(Res.get("shared.iConfirm"))
1248+
.closeButtonText(Res.get("shared.close"))
1249+
.width(Layout.INITIAL_WINDOW_WIDTH)
1250+
.onClose(() -> close(false))
1251+
.show();
1252+
}, 500, TimeUnit.MILLISECONDS);
1253+
}
1254+
}
1255+
12381256
private Tuple2<Label, VBox> getTradeInputBox(HBox amountValueBox, String promptText) {
12391257
Label descriptionLabel = new AutoTooltipLabel(promptText);
12401258
descriptionLabel.setId("input-description-label");

0 commit comments

Comments
 (0)