Skip to content

Commit

Permalink
Merge pull request #2426 from ManfredKarrer/remove-email-from-revolut…
Browse files Browse the repository at this point in the history
…-form

Remove email for Revolut accounts
  • Loading branch information
ripcurlx authored Feb 16, 2019
2 parents 14cfdbc + 6589d6e commit 7738b91
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 19 deletions.
6 changes: 5 additions & 1 deletion core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,8 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email
payment.revolut.phoneNr=Registered phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down Expand Up @@ -2441,6 +2442,9 @@ payment.limits.info=Please be aware that all bank transfers carry a certain amou
payment.cashDeposit.info=Please confirm your bank allows you to send cash deposits into other peoples' accounts. \
For example, Bank of America and Wells Fargo no longer allow such deposits.

payment.revolut.info=Please be sure that the phone number you used for your Revolut account is registered at Revolut \
otherwise the BTC buyer cannot send you the funds.

payment.f2f.contact=Contact info
payment.f2f.contact.prompt=How you want to get contacted by the trading peer? (email address, phone number,...)
payment.f2f.city=City for 'Face to face' meeting
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=E-Mail oder Telefonnummer
payment.venmo.venmoUserName=Venmo Nutzername
payment.popmoney.accountId=E-Mail oder Telefonnummer
payment.revolut.accountId=E-Mail oder Telefonnummer
payment.revolut.email=E-Mail oder Telefonnummer
payment.promptPay.promptPayId=Personalausweis/Steuernummer oder Telefonnr.
payment.supportedCurrencies=Unterstützte Währungen
payment.limitations=Einschränkungen
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_el.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Correo electrónico o núm. de telefóno
payment.venmo.venmoUserName=Nombre de usuario Venmo
payment.popmoney.accountId=Correo electrónico o núm. de telefóno
payment.revolut.accountId=Correo electrónico o núm. de telefóno
payment.revolut.email=Correo electrónico o núm. de telefóno
payment.promptPay.promptPayId=Citizen ID/Tax ID o número de teléfono
payment.supportedCurrencies=Monedas soportadas
payment.limitations=Límitaciones:
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_fa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=ایمیل یا شماره تلفن
payment.venmo.venmoUserName=نام کاربری Venmo
payment.popmoney.accountId=ایمیل یا شماره تلفن
payment.revolut.accountId=ایمیل یا شماره تلفن
payment.revolut.email=ایمیل یا شماره تلفن
payment.promptPay.promptPayId=شناسه شهروندی/شناسه مالیاتی یا شماره تلفن
payment.supportedCurrencies=ارزهای مورد حمایت
payment.limitations=محدودیت‌ها
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_hu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag:
payment.moneyBeam.accountId=E-mail ou nº de telefone
payment.venmo.venmoUserName=Nome do usuário do Venmo
payment.popmoney.accountId=E-mail ou nº de telefone
payment.revolut.accountId=E-mail ou nº de telefone
payment.revolut.email=E-mail ou nº de telefone
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Moedas suportadas
payment.limitations=Limites
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_ro.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Э-почта или тел. номер
payment.venmo.venmoUserName=Логин Venmo
payment.popmoney.accountId=Э-почта или тел. номер
payment.revolut.accountId=Э-почта или тел. номер
payment.revolut.email=Э-почта или тел. номер
payment.promptPay.promptPayId=Удостовер. гражданства / налог. идент. или номер телефона.
payment.supportedCurrencies=Поддерживаемые валюты
payment.limitations=Ограничения
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_sr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_th.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=อีเมลหรือหมายเลขโทรศัพท์
payment.venmo.venmoUserName=ชื่อผู้ใช้ Venmo
payment.popmoney.accountId=อีเมลหรือหมายเลขโทรศัพท์
payment.revolut.accountId=อีเมลหรือหมายเลขโทรศัพท์
payment.revolut.email=อีเมลหรือหมายเลขโทรศัพท์
payment.promptPay.promptPayId=รหัสบัตรประชาชน/รหัสประจำตัวผู้เสียภาษี หรือเบอร์โทรศัพท์
payment.supportedCurrencies=สกุลเงินที่ได้รับการสนับสนุน
payment.limitations=ข้อจำกัด
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_vi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email hoặc số điện thoại
payment.venmo.venmoUserName=Tên người dùng Venmo
payment.popmoney.accountId=Email hoặc số điện thoại
payment.revolut.accountId=Email hoặc số điện thoại
payment.revolut.email=Email hoặc số điện thoại
payment.promptPay.promptPayId=ID công dân/ ID thuế hoặc số điện thoại
payment.supportedCurrencies=Tiền tệ hỗ trợ
payment.limitations=Hạn chế
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ payment.cashApp.cashTag=$Cashtag
payment.moneyBeam.accountId=Email or phone no.
payment.venmo.venmoUserName=Venmo username
payment.popmoney.accountId=Email or phone no.
payment.revolut.accountId=Email or phone no.
payment.revolut.email=Email or phone no.
payment.promptPay.promptPayId=Citizen ID/Tax ID or phone no.
payment.supportedCurrencies=Supported currencies
payment.limitations=Limitations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,20 @@ public class RevolutForm extends PaymentMethodForm {

public static int addFormForBuyer(GridPane gridPane, int gridRow,
PaymentAccountPayload paymentAccountPayload) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.revolut.accountId"),
((RevolutAccountPayload) paymentAccountPayload).getAccountId());
String accountId = ((RevolutAccountPayload) paymentAccountPayload).getAccountId();
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, getTitle(accountId), accountId);

return gridRow;
}

private static String getTitle(String accountId) {
// From 0.9.4 on we only allow phone nr. as with emails we got too many disputes as users used an email which was
// not registered at Revolut. It seems that phone numbers need to be registered at least we have no reports from
// arbitrators with such cases. Thought email is still supported for backward compatibility.
// We might still get emails from users who have registered when email was supported
return accountId.contains("@") ? Res.get("payment.revolut.email") : Res.get("payment.revolut.phoneNr");
}

public RevolutForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService,
RevolutValidator revolutValidator, InputValidator inputValidator, GridPane gridPane,
int gridRow, BSFormatter formatter) {
Expand All @@ -65,7 +74,7 @@ public RevolutForm(PaymentAccount paymentAccount, AccountAgeWitnessService accou
public void addFormForAddAccount() {
gridRowFrom = gridRow + 1;

accountIdInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.revolut.accountId"));
accountIdInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow, Res.get("payment.revolut.phoneNr"));
accountIdInputTextField.setValidator(validator);
accountIdInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
account.setAccountId(newValue);
Expand Down Expand Up @@ -102,8 +111,8 @@ public void addFormForDisplayAccount() {
account.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
Res.get(account.getPaymentMethod().getId()));
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.revolut.accountId"),
account.getAccountId()).second;
String accountId = account.getAccountId();
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, getTitle(accountId), accountId).second;
field.setMouseTransparent(false);
addLimitations(true);
addCurrenciesGrid(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
import bisq.core.payment.MoneyGramAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PaymentAccountFactory;
import bisq.core.payment.RevolutAccount;
import bisq.core.payment.WesternUnionAccount;
import bisq.core.payment.payload.PaymentMethod;
import bisq.core.util.BSFormatter;
Expand Down Expand Up @@ -268,6 +269,13 @@ private void onSaveNewAccount(PaymentAccount paymentAccount) {
.actionButtonText(Res.get("shared.iConfirm"))
.onAction(() -> doSaveNewAccount(paymentAccount))
.show();
} else if (paymentAccount instanceof RevolutAccount) {
new Popup<>().information(Res.get("payment.revolut.info"))
.width(700)
.closeButtonText(Res.get("shared.cancel"))
.actionButtonText(Res.get("shared.iConfirm"))
.onAction(() -> doSaveNewAccount(paymentAccount))
.show();
} else {
doSaveNewAccount(paymentAccount);
}
Expand Down

0 comments on commit 7738b91

Please sign in to comment.