rename 'cash by atm' to 'cash at atm'

This commit is contained in:
woodser 2023-06-05 11:25:39 -04:00
parent 9fffd74ddb
commit ec49e2f327
11 changed files with 60 additions and 60 deletions

View file

@ -22,9 +22,9 @@ import haveno.core.account.witness.AccountAgeWitnessService;
import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.Res;
import haveno.core.locale.TradeCurrency;
import haveno.core.payment.CashByAtmAccount;
import haveno.core.payment.CashAtAtmAccount;
import haveno.core.payment.PaymentAccount;
import haveno.core.payment.payload.CashByAtmAccountPayload;
import haveno.core.payment.payload.CashAtAtmAccountPayload;
import haveno.core.payment.payload.PaymentAccountPayload;
import haveno.core.util.coin.CoinFormatter;
import haveno.core.util.validation.InputValidator;
@ -36,12 +36,12 @@ import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextArea;
import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField;
import static haveno.desktop.util.FormBuilder.addTopLabelTextArea;
public class CashByAtmForm extends PaymentMethodForm {
private final CashByAtmAccount cashByAtmAccount;
public class CashAtAtmForm extends PaymentMethodForm {
private final CashAtAtmAccount cashAtAtmAccount;
public static int addFormForBuyer(GridPane gridPane, int gridRow,
PaymentAccountPayload paymentAccountPayload) {
CashByAtmAccountPayload cbm = (CashByAtmAccountPayload) paymentAccountPayload;
CashAtAtmAccountPayload cbm = (CashAtAtmAccountPayload) paymentAccountPayload;
TextArea textExtraInfo = addCompactTopLabelTextArea(gridPane, gridRow, 1, Res.get("payment.shared.extraInfo"), "").second;
textExtraInfo.setMinHeight(70);
@ -50,11 +50,11 @@ public class CashByAtmForm extends PaymentMethodForm {
return gridRow;
}
public CashByAtmForm(PaymentAccount paymentAccount,
public CashAtAtmForm(PaymentAccount paymentAccount,
AccountAgeWitnessService accountAgeWitnessService,
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.cashByAtmAccount = (CashByAtmAccount) paymentAccount;
this.cashAtAtmAccount = (CashAtAtmAccount) paymentAccount;
}
@Override
@ -65,11 +65,11 @@ public class CashByAtmForm extends PaymentMethodForm {
currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllSortedFiatCurrencies()));
TextArea extraTextArea = addTopLabelTextArea(gridPane, ++gridRow,
Res.get("payment.shared.optionalExtra"), Res.get("payment.cashByAtm.extraInfo.prompt")).second;
Res.get("payment.shared.optionalExtra"), Res.get("payment.cashAtAtm.extraInfo.prompt")).second;
extraTextArea.setMinHeight(70);
((JFXTextArea) extraTextArea).setLabelFloat(false);
extraTextArea.textProperty().addListener((ov, oldValue, newValue) -> {
cashByAtmAccount.setExtraInfo(newValue);
cashAtAtmAccount.setExtraInfo(newValue);
updateFromInputs();
});
@ -79,7 +79,7 @@ public class CashByAtmForm extends PaymentMethodForm {
@Override
protected void autoFillNameTextField() {
setAccountNameWithString(cashByAtmAccount.getExtraInfo().substring(0, Math.min(50, cashByAtmAccount.getExtraInfo().length())));
setAccountNameWithString(cashAtAtmAccount.getExtraInfo().substring(0, Math.min(50, cashAtAtmAccount.getExtraInfo().length())));
}
@Override
@ -87,14 +87,14 @@ public class CashByAtmForm extends PaymentMethodForm {
gridRowFrom = gridRow;
addAccountNameTextFieldWithAutoFillToggleButton();
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.paymentMethod"),
Res.get(cashByAtmAccount.getPaymentMethod().getId()));
Res.get(cashAtAtmAccount.getPaymentMethod().getId()));
TradeCurrency tradeCurrency = paymentAccount.getSingleTradeCurrency();
String nameAndCode = tradeCurrency != null ? tradeCurrency.getNameAndCode() : "";
addCompactTopLabelTextField(gridPane, ++gridRow, Res.get("shared.currency"), nameAndCode);
TextArea textAreaExtra = addCompactTopLabelTextArea(gridPane, ++gridRow, Res.get("payment.shared.extraInfo"), "").second;
textAreaExtra.setText(cashByAtmAccount.getExtraInfo());
textAreaExtra.setText(cashAtAtmAccount.getExtraInfo());
textAreaExtra.setMinHeight(70);
textAreaExtra.setEditable(false);
@ -104,7 +104,7 @@ public class CashByAtmForm extends PaymentMethodForm {
@Override
public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid()
&& !cashByAtmAccount.getExtraInfo().isEmpty()
&& !cashAtAtmAccount.getExtraInfo().isEmpty()
&& paymentAccount.getSingleTradeCurrency() != null);
}
}

View file

@ -26,7 +26,7 @@ import haveno.core.locale.Res;
import haveno.core.offer.OfferRestrictions;
import haveno.core.payment.AmazonGiftCardAccount;
import haveno.core.payment.AustraliaPayidAccount;
import haveno.core.payment.CashByAtmAccount;
import haveno.core.payment.CashAtAtmAccount;
import haveno.core.payment.PayByMailAccount;
import haveno.core.payment.CashDepositAccount;
import haveno.core.payment.ZelleAccount;
@ -73,7 +73,7 @@ import haveno.desktop.components.paymentmethods.AmazonGiftCardForm;
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
import haveno.desktop.components.paymentmethods.BizumForm;
import haveno.desktop.components.paymentmethods.CapitualForm;
import haveno.desktop.components.paymentmethods.CashByAtmForm;
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
import haveno.desktop.components.paymentmethods.PayByMailForm;
import haveno.desktop.components.paymentmethods.CashDepositForm;
import haveno.desktop.components.paymentmethods.CelPayForm;
@ -272,9 +272,9 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
.actionButtonText(Res.get("shared.iUnderstand"))
.onAction(() -> doSaveNewAccount(paymentAccount))
.show();
} else if (paymentAccount instanceof CashByAtmAccount) {
// CashByAtm has no chargeback risk so we don't show the text from payment.limits.info.
new Popup().information(Res.get("payment.cashByAtm.info"))
} else if (paymentAccount instanceof CashAtAtmAccount) {
// CashAtAtm has no chargeback risk so we don't show the text from payment.limits.info.
new Popup().information(Res.get("payment.cashAtAtm.info"))
.width(850)
.closeButtonText(Res.get("shared.cancel"))
.actionButtonText(Res.get("shared.iUnderstand"))
@ -569,8 +569,8 @@ public class TraditionalAccountsView extends PaymentAccountsView<GridPane, Tradi
return new CashDepositForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
case PaymentMethod.PAY_BY_MAIL_ID:
return new PayByMailForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
case PaymentMethod.CASH_BY_ATM_ID:
return new CashByAtmForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
case PaymentMethod.CASH_AT_ATM_ID:
return new CashAtAtmForm(paymentAccount, accountAgeWitnessService, inputValidator, root, gridRow, formatter);
case PaymentMethod.HAL_CASH_ID:
return new HalCashForm(paymentAccount, accountAgeWitnessService, halCashValidator, inputValidator, root, gridRow, formatter);
case PaymentMethod.F2F_ID:

View file

@ -160,7 +160,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
private int gridRow = 0;
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed,
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashByAtmWarningDisplayed;
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashAtAtmWarningDisplayed;
private SimpleBooleanProperty errorPopupDisplayed;
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
@ -268,7 +268,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
maybeShowFasterPaymentsWarning(lastPaymentAccount);
maybeShowAccountWarning(lastPaymentAccount, model.dataModel.isBuyOffer());
maybeShowPayByMailWarning(lastPaymentAccount, model.dataModel.getOffer());
maybeShowCashByAtmWarning(lastPaymentAccount, model.dataModel.getOffer());
maybeShowCashAtAtmWarning(lastPaymentAccount, model.dataModel.getOffer());
if (!model.isRange()) {
nextButton.setVisible(false);
@ -1136,10 +1136,10 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
}
}
private void maybeShowCashByAtmWarning(PaymentAccount paymentAccount, Offer offer) {
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_BY_ATM_ID) &&
!cashByAtmWarningDisplayed && !offer.getExtraInfo().isEmpty()) {
cashByAtmWarningDisplayed = true;
private void maybeShowCashAtAtmWarning(PaymentAccount paymentAccount, Offer offer) {
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_AT_ATM_ID) &&
!cashAtAtmWarningDisplayed && !offer.getExtraInfo().isEmpty()) {
cashAtAtmWarningDisplayed = true;
UserThread.runAfter(() -> {
new GenericMessageWindow()
.preamble(Res.get("payment.tradingRestrictions"))

View file

@ -52,7 +52,7 @@ import haveno.desktop.components.paymentmethods.AssetsForm;
import haveno.desktop.components.paymentmethods.AustraliaPayidForm;
import haveno.desktop.components.paymentmethods.BizumForm;
import haveno.desktop.components.paymentmethods.CapitualForm;
import haveno.desktop.components.paymentmethods.CashByAtmForm;
import haveno.desktop.components.paymentmethods.CashAtAtmForm;
import haveno.desktop.components.paymentmethods.PayByMailForm;
import haveno.desktop.components.paymentmethods.CashDepositForm;
import haveno.desktop.components.paymentmethods.CelPayForm;
@ -300,8 +300,8 @@ public class BuyerStep2View extends TradeStepView {
case PaymentMethod.PAY_BY_MAIL_ID:
gridRow = PayByMailForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.CASH_BY_ATM_ID:
gridRow = CashByAtmForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
case PaymentMethod.CASH_AT_ATM_ID:
gridRow = CashAtAtmForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break;
case PaymentMethod.MONEY_GRAM_ID:
gridRow = MoneyGramForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);