mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-10 15:40:22 -04:00
rename clearXchange to zelle
This commit is contained in:
parent
2afa5d761d
commit
cffbfa8aaa
38 changed files with 160 additions and 160 deletions
|
@ -20,9 +20,9 @@ package haveno.desktop.components.paymentmethods;
|
|||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.locale.TradeCurrency;
|
||||
import haveno.core.payment.ClearXchangeAccount;
|
||||
import haveno.core.payment.ZelleAccount;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.payload.ClearXchangeAccountPayload;
|
||||
import haveno.core.payment.payload.ZelleAccountPayload;
|
||||
import haveno.core.payment.payload.PaymentAccountPayload;
|
||||
import haveno.core.payment.validation.EmailOrMobileNrValidator;
|
||||
import haveno.core.util.coin.CoinFormatter;
|
||||
|
@ -36,22 +36,22 @@ import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
|
|||
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
|
||||
import static haveno.desktop.util.FormBuilder.addTopLabelTextField;
|
||||
|
||||
public class ClearXchangeForm extends PaymentMethodForm {
|
||||
private final ClearXchangeAccount clearXchangeAccount;
|
||||
private final EmailOrMobileNrValidator clearXchangeValidator;
|
||||
public class ZelleForm extends PaymentMethodForm {
|
||||
private final ZelleAccount zelleAccount;
|
||||
private final EmailOrMobileNrValidator zelleValidator;
|
||||
|
||||
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
|
||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.account.owner"),
|
||||
((ClearXchangeAccountPayload) paymentAccountPayload).getHolderName());
|
||||
((ZelleAccountPayload) paymentAccountPayload).getHolderName());
|
||||
addCompactTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1, Res.get("payment.email.mobile"),
|
||||
((ClearXchangeAccountPayload) paymentAccountPayload).getEmailOrMobileNr());
|
||||
((ZelleAccountPayload) paymentAccountPayload).getEmailOrMobileNr());
|
||||
return gridRow;
|
||||
}
|
||||
|
||||
public ClearXchangeForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, EmailOrMobileNrValidator clearXchangeValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||
public ZelleForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, EmailOrMobileNrValidator zelleValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
|
||||
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
|
||||
this.clearXchangeAccount = (ClearXchangeAccount) paymentAccount;
|
||||
this.clearXchangeValidator = clearXchangeValidator;
|
||||
this.zelleAccount = (ZelleAccount) paymentAccount;
|
||||
this.zelleValidator = zelleValidator;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,18 +62,18 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
|||
Res.get("payment.account.owner"));
|
||||
holderNameInputTextField.setValidator(inputValidator);
|
||||
holderNameInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||
clearXchangeAccount.setHolderName(newValue.trim());
|
||||
zelleAccount.setHolderName(newValue.trim());
|
||||
updateFromInputs();
|
||||
});
|
||||
|
||||
InputTextField mobileNrInputTextField = FormBuilder.addInputTextField(gridPane, ++gridRow,
|
||||
Res.get("payment.email.mobile"));
|
||||
mobileNrInputTextField.setValidator(clearXchangeValidator);
|
||||
mobileNrInputTextField.setValidator(zelleValidator);
|
||||
mobileNrInputTextField.textProperty().addListener((ov, oldValue, newValue) -> {
|
||||
clearXchangeAccount.setEmailOrMobileNr(newValue.trim());
|
||||
zelleAccount.setEmailOrMobileNr(newValue.trim());
|
||||
updateFromInputs();
|
||||
});
|
||||
final TradeCurrency singleTradeCurrency = clearXchangeAccount.getSingleTradeCurrency();
|
||||
final TradeCurrency singleTradeCurrency = zelleAccount.getSingleTradeCurrency();
|
||||
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
|
||||
addTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"),
|
||||
nameAndCode);
|
||||
|
@ -83,7 +83,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
|||
|
||||
@Override
|
||||
protected void autoFillNameTextField() {
|
||||
setAccountNameWithString(clearXchangeAccount.getEmailOrMobileNr());
|
||||
setAccountNameWithString(zelleAccount.getEmailOrMobileNr());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -91,13 +91,13 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
|||
gridRowFrom = gridRow;
|
||||
addAccountNameTextFieldWithAutoFillToggleButton();
|
||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
|
||||
Res.get(clearXchangeAccount.getPaymentMethod().getId()));
|
||||
Res.get(zelleAccount.getPaymentMethod().getId()));
|
||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.account.owner"),
|
||||
clearXchangeAccount.getHolderName());
|
||||
zelleAccount.getHolderName());
|
||||
TextField field = addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("payment.email.mobile"),
|
||||
clearXchangeAccount.getEmailOrMobileNr()).second;
|
||||
zelleAccount.getEmailOrMobileNr()).second;
|
||||
field.setMouseTransparent(false);
|
||||
final TradeCurrency singleTradeCurrency = clearXchangeAccount.getSingleTradeCurrency();
|
||||
final TradeCurrency singleTradeCurrency = zelleAccount.getSingleTradeCurrency();
|
||||
final String nameAndCode = singleTradeCurrency != null ? singleTradeCurrency.getNameAndCode() : "";
|
||||
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"),
|
||||
nameAndCode);
|
||||
|
@ -107,8 +107,8 @@ public class ClearXchangeForm extends PaymentMethodForm {
|
|||
@Override
|
||||
public void updateAllInputsValid() {
|
||||
allInputsValid.set(isAccountNameValid()
|
||||
&& clearXchangeValidator.validate(clearXchangeAccount.getEmailOrMobileNr()).isValid
|
||||
&& inputValidator.validate(clearXchangeAccount.getHolderName()).isValid
|
||||
&& clearXchangeAccount.getTradeCurrencies().size() > 0);
|
||||
&& zelleValidator.validate(zelleAccount.getEmailOrMobileNr()).isValid
|
||||
&& inputValidator.validate(zelleAccount.getHolderName()).isValid
|
||||
&& zelleAccount.getTradeCurrencies().size() > 0);
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ import haveno.core.payment.AmazonGiftCardAccount;
|
|||
import haveno.core.payment.AustraliaPayidAccount;
|
||||
import haveno.core.payment.CashByMailAccount;
|
||||
import haveno.core.payment.CashDepositAccount;
|
||||
import haveno.core.payment.ClearXchangeAccount;
|
||||
import haveno.core.payment.ZelleAccount;
|
||||
import haveno.core.payment.F2FAccount;
|
||||
import haveno.core.payment.HalCashAccount;
|
||||
import haveno.core.payment.MoneyGramAccount;
|
||||
|
@ -76,7 +76,7 @@ import haveno.desktop.components.paymentmethods.CashByMailForm;
|
|||
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
||||
import haveno.desktop.components.paymentmethods.CelPayForm;
|
||||
import haveno.desktop.components.paymentmethods.ChaseQuickPayForm;
|
||||
import haveno.desktop.components.paymentmethods.ClearXchangeForm;
|
||||
import haveno.desktop.components.paymentmethods.ZelleForm;
|
||||
import haveno.desktop.components.paymentmethods.DomesticWireTransferForm;
|
||||
import haveno.desktop.components.paymentmethods.F2FForm;
|
||||
import haveno.desktop.components.paymentmethods.FasterPaymentsForm;
|
||||
|
@ -157,7 +157,7 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
private final AliPayValidator aliPayValidator;
|
||||
private final PerfectMoneyValidator perfectMoneyValidator;
|
||||
private final SwishValidator swishValidator;
|
||||
private final EmailOrMobileNrValidator clearXchangeValidator;
|
||||
private final EmailOrMobileNrValidator zelleValidator;
|
||||
private final ChaseQuickPayValidator chaseQuickPayValidator;
|
||||
private final InteracETransferValidator interacETransferValidator;
|
||||
private final JapanBankTransferValidator japanBankTransferValidator;
|
||||
|
@ -188,7 +188,7 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
AliPayValidator aliPayValidator,
|
||||
PerfectMoneyValidator perfectMoneyValidator,
|
||||
SwishValidator swishValidator,
|
||||
EmailOrMobileNrValidator clearXchangeValidator,
|
||||
EmailOrMobileNrValidator zelleValidator,
|
||||
ChaseQuickPayValidator chaseQuickPayValidator,
|
||||
InteracETransferValidator interacETransferValidator,
|
||||
JapanBankTransferValidator japanBankTransferValidator,
|
||||
|
@ -216,7 +216,7 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
this.aliPayValidator = aliPayValidator;
|
||||
this.perfectMoneyValidator = perfectMoneyValidator;
|
||||
this.swishValidator = swishValidator;
|
||||
this.clearXchangeValidator = clearXchangeValidator;
|
||||
this.zelleValidator = zelleValidator;
|
||||
this.chaseQuickPayValidator = chaseQuickPayValidator;
|
||||
this.interacETransferValidator = interacETransferValidator;
|
||||
this.japanBankTransferValidator = japanBankTransferValidator;
|
||||
|
@ -297,8 +297,8 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
.actionButtonText(Res.get("shared.iUnderstand"))
|
||||
.onAction(() -> {
|
||||
final String currencyName = Config.baseCurrencyNetwork().getCurrencyName();
|
||||
if (paymentAccount instanceof ClearXchangeAccount) {
|
||||
new Popup().information(Res.get("payment.clearXchange.info", currencyName, currencyName))
|
||||
if (paymentAccount instanceof ZelleAccount) {
|
||||
new Popup().information(Res.get("payment.zelle.info", currencyName, currencyName))
|
||||
.width(900)
|
||||
.closeButtonText(Res.get("shared.cancel"))
|
||||
.actionButtonText(Res.get("shared.iConfirm"))
|
||||
|
@ -543,8 +543,8 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
return new WeChatPayForm(paymentAccount, accountAgeWitnessService, weChatPayValidator, inputValidator, root, gridRow, formatter);
|
||||
case PaymentMethod.SWISH_ID:
|
||||
return new SwishForm(paymentAccount, accountAgeWitnessService, swishValidator, inputValidator, root, gridRow, formatter);
|
||||
case PaymentMethod.CLEAR_X_CHANGE_ID:
|
||||
return new ClearXchangeForm(paymentAccount, accountAgeWitnessService, clearXchangeValidator, inputValidator, root, gridRow, formatter);
|
||||
case PaymentMethod.ZELLE_ID:
|
||||
return new ZelleForm(paymentAccount, accountAgeWitnessService, zelleValidator, inputValidator, root, gridRow, formatter);
|
||||
case PaymentMethod.CHASE_QUICK_PAY_ID:
|
||||
return new ChaseQuickPayForm(paymentAccount, accountAgeWitnessService, chaseQuickPayValidator, inputValidator, root, gridRow, formatter);
|
||||
case PaymentMethod.INTERAC_E_TRANSFER_ID:
|
||||
|
|
|
@ -164,7 +164,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
protected int gridRow = 0;
|
||||
private final List<Node> editOfferElements = new ArrayList<>();
|
||||
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
|
||||
private boolean clearXchangeWarningDisplayed, fasterPaymentsWarningDisplayed, isActivated;
|
||||
private boolean zelleWarningDisplayed, fasterPaymentsWarningDisplayed, isActivated;
|
||||
private InfoInputTextField marketBasedPriceInfoInputTextField, volumeInfoInputTextField,
|
||||
buyerSecurityDepositInfoInputTextField, triggerPriceInfoInputTextField;
|
||||
private Text xIcon, fakeXIcon;
|
||||
|
@ -450,11 +450,11 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
fakeXLabel.getStyleClass().add("small");
|
||||
}
|
||||
|
||||
private void maybeShowClearXchangeWarning(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CLEAR_X_CHANGE_ID) &&
|
||||
!clearXchangeWarningDisplayed) {
|
||||
clearXchangeWarningDisplayed = true;
|
||||
UserThread.runAfter(GUIUtil::showClearXchangeWarning, 500, TimeUnit.MILLISECONDS);
|
||||
private void maybeShowZelleWarning(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.ZELLE_ID) &&
|
||||
!zelleWarningDisplayed) {
|
||||
zelleWarningDisplayed = true;
|
||||
UserThread.runAfter(GUIUtil::showZelleWarning, 500, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
|
||||
PaymentAccount paymentAccount = paymentAccountsComboBox.getSelectionModel().getSelectedItem();
|
||||
if (paymentAccount != null) {
|
||||
maybeShowClearXchangeWarning(paymentAccount);
|
||||
maybeShowZelleWarning(paymentAccount);
|
||||
maybeShowFasterPaymentsWarning(paymentAccount);
|
||||
maybeShowAccountWarning(paymentAccount, model.getDataModel().isBuyOffer());
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
|
||||
private int gridRow = 0;
|
||||
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
|
||||
private boolean offerDetailsWindowDisplayed, clearXchangeWarningDisplayed, fasterPaymentsWarningDisplayed,
|
||||
private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed,
|
||||
takeOfferFromUnsignedAccountWarningDisplayed, cashByMailWarningDisplayed;
|
||||
private SimpleBooleanProperty errorPopupDisplayed;
|
||||
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
|
||||
|
@ -264,7 +264,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
balanceTextField.setTargetAmount(model.dataModel.getTotalToPay().get());
|
||||
|
||||
maybeShowTakeOfferFromUnsignedAccountWarning(model.dataModel.getOffer());
|
||||
maybeShowClearXchangeWarning(lastPaymentAccount);
|
||||
maybeShowZelleWarning(lastPaymentAccount);
|
||||
maybeShowFasterPaymentsWarning(lastPaymentAccount);
|
||||
maybeShowAccountWarning(lastPaymentAccount, model.dataModel.isBuyOffer());
|
||||
maybeShowCashByMailWarning(lastPaymentAccount, model.dataModel.getOffer());
|
||||
|
@ -733,7 +733,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
paymentAccountsComboBox.setOnAction(e -> {
|
||||
PaymentAccount paymentAccount = paymentAccountsComboBox.getSelectionModel().getSelectedItem();
|
||||
if (paymentAccount != null) {
|
||||
maybeShowClearXchangeWarning(paymentAccount);
|
||||
maybeShowZelleWarning(paymentAccount);
|
||||
maybeShowFasterPaymentsWarning(paymentAccount);
|
||||
maybeShowAccountWarning(paymentAccount, model.dataModel.isBuyOffer());
|
||||
}
|
||||
|
@ -1096,11 +1096,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
}
|
||||
}
|
||||
|
||||
private void maybeShowClearXchangeWarning(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CLEAR_X_CHANGE_ID) &&
|
||||
!clearXchangeWarningDisplayed) {
|
||||
clearXchangeWarningDisplayed = true;
|
||||
UserThread.runAfter(GUIUtil::showClearXchangeWarning, 500, TimeUnit.MILLISECONDS);
|
||||
private void maybeShowZelleWarning(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.ZELLE_ID) &&
|
||||
!zelleWarningDisplayed) {
|
||||
zelleWarningDisplayed = true;
|
||||
UserThread.runAfter(GUIUtil::showZelleWarning, 500, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ import haveno.desktop.components.paymentmethods.CashByMailForm;
|
|||
import haveno.desktop.components.paymentmethods.CashDepositForm;
|
||||
import haveno.desktop.components.paymentmethods.CelPayForm;
|
||||
import haveno.desktop.components.paymentmethods.ChaseQuickPayForm;
|
||||
import haveno.desktop.components.paymentmethods.ClearXchangeForm;
|
||||
import haveno.desktop.components.paymentmethods.ZelleForm;
|
||||
import haveno.desktop.components.paymentmethods.DomesticWireTransferForm;
|
||||
import haveno.desktop.components.paymentmethods.F2FForm;
|
||||
import haveno.desktop.components.paymentmethods.FasterPaymentsForm;
|
||||
|
@ -276,8 +276,8 @@ public class BuyerStep2View extends TradeStepView {
|
|||
case PaymentMethod.WECHAT_PAY_ID:
|
||||
gridRow = WeChatPayForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.CLEAR_X_CHANGE_ID:
|
||||
gridRow = ClearXchangeForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
case PaymentMethod.ZELLE_ID:
|
||||
gridRow = ZelleForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
break;
|
||||
case PaymentMethod.CHASE_QUICK_PAY_ID:
|
||||
gridRow = ChaseQuickPayForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
|
||||
|
|
|
@ -657,10 +657,10 @@ public class GUIUtil {
|
|||
return t.cast(parent);
|
||||
}
|
||||
|
||||
public static void showClearXchangeWarning() {
|
||||
String key = "confirmClearXchangeRequirements";
|
||||
public static void showZelleWarning() {
|
||||
String key = "confirmZelleRequirements";
|
||||
final String currencyName = Config.baseCurrencyNetwork().getCurrencyName();
|
||||
new Popup().information(Res.get("payment.clearXchange.info", currencyName, currencyName))
|
||||
new Popup().information(Res.get("payment.zelle.info", currencyName, currencyName))
|
||||
.width(900)
|
||||
.closeButtonText(Res.get("shared.iConfirm"))
|
||||
.dontShowAgainId(key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue