Remove email from sepa account

This commit is contained in:
Manfred Karrer 2017-07-15 13:12:09 +02:00
parent e857d411bb
commit ca9e53a2ab
9 changed files with 26 additions and 55 deletions

View File

@ -20,6 +20,6 @@ public class DevEnv {
@SuppressWarnings("PointlessBooleanExpression")
public static final boolean DEV_MODE = STRESS_TEST_MODE || true;
public static final boolean DAO_ACTIVATED = true;
public static final boolean DAO_ACTIVATED = false;
public static final boolean DAO_PHASE2_ACTIVATED = false;
}

View File

@ -1513,15 +1513,12 @@ otherwise it is very likely that the Zelle (ClearXchange) transfer fails and the
If you have not fulfilled the above requirements you would lose your security deposit in such a case.\n\n\
Please be also aware of a higher chargeback risk when using Zelle (ClearXchange).\n\
For the {0} seller it is highly recommended \
to verify the identity of the {1} buyer by contacting the peer using the provided email address or mobile number.
to get in contact with the {1} buyer by using the provided email address or mobile number to verify that he or she \
is really the owner of the Zelle (ClearXchange) account.
payment.chargeback.info=Any bank transfer carries some chargeback risks (reversal of payment).\n\n\
To protect {0} sellers against fraudulent payments the traders can get in touch using the email address from the payment \
account for verifying the peer''s identity (e.g. by providing government issued ID, utility bill,...).\n\n\
When receiving an email please check with Anti-Virus software to be sure to not get exposed to malware or phishing attacks. \
Also be aware of risks from social engineering scam attempts.\n\
In doubt contact the arbitrator or get in touch with the community on the Bisq Forum.\n\n\
By confirming with the button below you agree to exercise identity verification with the peer if requested.
popup.info.revertIdCheckRequirement=We removed the requirement introduced in version 0.5.0 for verifying the peers ID by email when payment methods \
with bank transfer was used.\n\
The email address is not exposed anymore (if not part of the payment method anyway)
# We use constants from the code so we do not use our normal naming convention
# dynamic values are not recognized by IntelliJ

View File

@ -50,14 +50,6 @@ public final class SepaAccount extends CountryBasedPaymentAccount implements Ban
return ((SepaAccountPayload) paymentAccountPayload).getHolderName();
}
public void setEmail(String value) {
((SepaAccountPayload) paymentAccountPayload).setEmail(value);
}
public String getEmail() {
return ((SepaAccountPayload) paymentAccountPayload).getEmail();
}
public void setIban(String iban) {
((SepaAccountPayload) paymentAccountPayload).setIban(iban);
}

View File

@ -137,7 +137,6 @@ public final class PaymentMethod implements PersistablePayload, Comparable {
maxTradeLimitMidRisk = Coin.parseCoin("250000");
maxTradeLimitLowRisk = Coin.parseCoin("500000");
break;
default:
log.error("Unsupported BaseCurrency. " + BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode());
throw new RuntimeException("Unsupported BaseCurrency. " + BisqEnvironment.getBaseCurrencyNetwork().getCurrencyCode());

View File

@ -43,8 +43,6 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
private String iban;
@Setter
private String bic;
@Setter
private String email;
// Dont use a set here as we need a deterministic ordering, otherwise the contract hash does not match
private final List<String> acceptedCountryCodes;
@ -68,13 +66,11 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
String holderName,
String iban,
String bic,
String email,
List<String> acceptedCountryCodes) {
super(paymentMethodName, id, maxTradePeriod, countryCode);
this.holderName = holderName;
this.iban = iban;
this.bic = bic;
this.email = email;
this.acceptedCountryCodes = acceptedCountryCodes;
}
@ -85,7 +81,6 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
.setHolderName(holderName)
.setIban(iban)
.setBic(bic)
.setEmail(email)
.addAllAcceptedCountryCodes(acceptedCountryCodes);
final PB.CountryBasedPaymentAccountPayload.Builder countryBasedPaymentAccountPayload = getPaymentAccountPayloadBuilder()
.getCountryBasedPaymentAccountPayloadBuilder()
@ -105,7 +100,6 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
sepaAccountPayload.getHolderName(),
sepaAccountPayload.getIban(),
sepaAccountPayload.getBic(),
sepaAccountPayload.getEmail(),
new ArrayList<>(sepaAccountPayload.getAcceptedCountryCodesList()));
}
@ -126,7 +120,7 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
@Override
public String getPaymentDetails() {
return "SEPA - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", Email: " + email + ", country code: " + getCountryCode();
return "SEPA - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", country code: " + getCountryCode();
}
@Override
@ -134,7 +128,6 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
return "Holder name: " + holderName + "\n" +
"IBAN: " + iban + "\n" +
"BIC: " + bic + "\n" +
"Email: " + email + "\n" +
"Country of bank: " + CountryUtil.getNameByCode(countryCode);
}
}

View File

@ -32,12 +32,8 @@ import io.bisq.gui.util.validation.InputValidator;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ClearXchangeForm extends PaymentMethodForm {
private static final Logger log = LoggerFactory.getLogger(ClearXchangeForm.class);
private final ClearXchangeAccount clearXchangeAccount;
private final ClearXchangeValidator clearXchangeValidator;
private InputTextField mobileNrInputTextField;

View File

@ -34,16 +34,12 @@ import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.util.StringConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nullable;
import static io.bisq.gui.util.FormBuilder.*;
public abstract class PaymentMethodForm {
private static final Logger log = LoggerFactory.getLogger(PaymentMethodForm.class);
protected final PaymentAccount paymentAccount;
protected final InputValidator inputValidator;
protected final GridPane gridPane;

View File

@ -28,7 +28,6 @@ import io.bisq.gui.util.BSFormatter;
import io.bisq.gui.util.FormBuilder;
import io.bisq.gui.util.Layout;
import io.bisq.gui.util.validation.BICValidator;
import io.bisq.gui.util.validation.EmailValidator;
import io.bisq.gui.util.validation.IBANValidator;
import io.bisq.gui.util.validation.InputValidator;
import javafx.collections.FXCollections;
@ -46,15 +45,15 @@ import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import static io.bisq.gui.util.FormBuilder.*;
import static io.bisq.gui.util.FormBuilder.addLabelTextFieldWithCopyIcon;
public class SepaForm extends PaymentMethodForm {
public static int addFormForBuyer(GridPane gridPane, int gridRow,
PaymentAccountPayload paymentAccountPayload) {
SepaAccountPayload sepaAccountPayload = (SepaAccountPayload) paymentAccountPayload;
final String title = Res.get("payment.account.owner") + " / " + Res.get("payment.email");
final String value = sepaAccountPayload.getHolderName() + " / " + sepaAccountPayload.getEmail();
final String title = Res.get("payment.account.owner");
final String value = sepaAccountPayload.getHolderName();
addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, title, value);
FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow,
@ -74,7 +73,6 @@ public class SepaForm extends PaymentMethodForm {
private final List<CheckBox> euroCountryCheckBoxes = new ArrayList<>();
private final List<CheckBox> nonEuroCountryCheckBoxes = new ArrayList<>();
private ComboBox<TradeCurrency> currencyComboBox;
private final EmailValidator emailValidator;
public SepaForm(PaymentAccount paymentAccount, IBANValidator ibanValidator,
BICValidator bicValidator, InputValidator inputValidator,
@ -83,8 +81,6 @@ public class SepaForm extends PaymentMethodForm {
this.sepaAccount = (SepaAccount) paymentAccount;
this.ibanValidator = ibanValidator;
this.bicValidator = bicValidator;
emailValidator = new EmailValidator();
}
@Override
@ -99,15 +95,6 @@ public class SepaForm extends PaymentMethodForm {
updateFromInputs();
});
InputTextField emailTextField = addLabelInputTextField(gridPane,
++gridRow, Res.get("payment.email")).second;
emailTextField.textProperty().addListener((ov, oldValue, newValue) -> {
sepaAccount.setEmail(newValue);
updateFromInputs();
});
emailTextField.setValidator(emailValidator);
ibanInputTextField = FormBuilder.addLabelInputTextField(gridPane, ++gridRow, "IBAN:").second;
ibanInputTextField.setValidator(ibanValidator);
ibanInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
@ -328,7 +315,6 @@ public class SepaForm extends PaymentMethodForm {
@Override
public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid()
&& emailValidator.validate(sepaAccount.getEmail()).isValid
&& bicValidator.validate(sepaAccount.getBic()).isValid
&& ibanValidator.validate(sepaAccount.getIban()).isValid
&& inputValidator.validate(sepaAccount.getHolderName()).isValid
@ -344,7 +330,6 @@ public class SepaForm extends PaymentMethodForm {
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.paymentMethod"),
Res.get(sepaAccount.getPaymentMethod().getId()));
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("payment.account.owner"), sepaAccount.getHolderName());
addLabelTextField(gridPane, ++gridRow, Res.get("payment.email"), sepaAccount.getEmail()).second.setMouseTransparent(false);
FormBuilder.addLabelTextField(gridPane, ++gridRow, "IBAN:", sepaAccount.getIban()).second.setMouseTransparent(false);
FormBuilder.addLabelTextField(gridPane, ++gridRow, "BIC:", sepaAccount.getBic()).second.setMouseTransparent(false);
FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.bank.country"),

View File

@ -22,7 +22,9 @@ import io.bisq.common.locale.Res;
import io.bisq.common.util.Tuple2;
import io.bisq.common.util.Tuple3;
import io.bisq.core.app.BisqEnvironment;
import io.bisq.core.payment.*;
import io.bisq.core.payment.ClearXchangeAccount;
import io.bisq.core.payment.PaymentAccount;
import io.bisq.core.payment.PaymentAccountFactory;
import io.bisq.core.payment.payload.PaymentMethod;
import io.bisq.gui.common.view.ActivatableViewAndModel;
import io.bisq.gui.common.view.FxmlView;
@ -144,7 +146,18 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
private void onSaveNewAccount(PaymentAccount paymentAccount) {
final String currencyName = BisqEnvironment.getBaseCurrencyNetwork().getCurrencyName();
if (paymentAccount instanceof SepaAccount ||
if (paymentAccount instanceof ClearXchangeAccount) {
new Popup<>().information(Res.get("payment.clearXchange.info", currencyName, currencyName))
.width(900)
.closeButtonText(Res.get("shared.cancel"))
.actionButtonText(Res.get("shared.iConfirm"))
.onAction(() -> doSaveNewAccount(paymentAccount))
.show();
} else {
doSaveNewAccount(paymentAccount);
}
/* if (paymentAccount instanceof SepaAccount ||
paymentAccount instanceof BankAccount ||
paymentAccount instanceof ClearXchangeAccount ||
paymentAccount instanceof FasterPaymentsAccount ||
@ -171,7 +184,7 @@ public class FiatAccountsView extends ActivatableViewAndModel<GridPane, FiatAcco
.show();
} else {
doSaveNewAccount(paymentAccount);
}
}*/
}
private void doSaveNewAccount(PaymentAccount paymentAccount) {