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

@ -20,14 +20,14 @@ package haveno.core.payment;
import haveno.core.api.model.PaymentAccountFormField; import haveno.core.api.model.PaymentAccountFormField;
import haveno.core.locale.CurrencyUtil; import haveno.core.locale.CurrencyUtil;
import haveno.core.locale.TradeCurrency; import haveno.core.locale.TradeCurrency;
import haveno.core.payment.payload.CashByAtmAccountPayload; import haveno.core.payment.payload.CashAtAtmAccountPayload;
import haveno.core.payment.payload.PaymentAccountPayload; import haveno.core.payment.payload.PaymentAccountPayload;
import haveno.core.payment.payload.PaymentMethod; import haveno.core.payment.payload.PaymentMethod;
import lombok.NonNull; import lombok.NonNull;
import java.util.List; import java.util.List;
public final class CashByAtmAccount extends PaymentAccount { public final class CashAtAtmAccount extends PaymentAccount {
public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies(); public static final List<TradeCurrency> SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies();
@ -35,13 +35,13 @@ public final class CashByAtmAccount extends PaymentAccount {
PaymentAccountFormField.FieldId.EXTRA_INFO PaymentAccountFormField.FieldId.EXTRA_INFO
); );
public CashByAtmAccount() { public CashAtAtmAccount() {
super(PaymentMethod.CASH_BY_ATM); super(PaymentMethod.CASH_AT_ATM);
} }
@Override @Override
protected PaymentAccountPayload createPayload() { protected PaymentAccountPayload createPayload() {
return new CashByAtmAccountPayload(paymentMethod.getId(), id); return new CashAtAtmAccountPayload(paymentMethod.getId(), id);
} }
@Override @Override
@ -55,10 +55,10 @@ public final class CashByAtmAccount extends PaymentAccount {
} }
public void setExtraInfo(String extraInfo) { public void setExtraInfo(String extraInfo) {
((CashByAtmAccountPayload) paymentAccountPayload).setExtraInfo(extraInfo); ((CashAtAtmAccountPayload) paymentAccountPayload).setExtraInfo(extraInfo);
} }
public String getExtraInfo() { public String getExtraInfo() {
return ((CashByAtmAccountPayload) paymentAccountPayload).getExtraInfo(); return ((CashAtAtmAccountPayload) paymentAccountPayload).getExtraInfo();
} }
} }

View File

@ -76,8 +76,8 @@ public class PaymentAccountFactory {
return new F2FAccount(); return new F2FAccount();
case PaymentMethod.PAY_BY_MAIL_ID: case PaymentMethod.PAY_BY_MAIL_ID:
return new PayByMailAccount(); return new PayByMailAccount();
case PaymentMethod.CASH_BY_ATM_ID: case PaymentMethod.CASH_AT_ATM_ID:
return new CashByAtmAccount(); return new CashAtAtmAccount();
case PaymentMethod.PROMPT_PAY_ID: case PaymentMethod.PROMPT_PAY_ID:
return new PromptPayAccount(); return new PromptPayAccount();
case PaymentMethod.ADVANCED_CASH_ID: case PaymentMethod.ADVANCED_CASH_ID:

View File

@ -35,10 +35,10 @@ import java.util.Map;
@Setter @Setter
@Getter @Getter
@Slf4j @Slf4j
public final class CashByAtmAccountPayload extends PaymentAccountPayload { public final class CashAtAtmAccountPayload extends PaymentAccountPayload {
private String extraInfo = ""; private String extraInfo = "";
public CashByAtmAccountPayload(String paymentMethod, String id) { public CashAtAtmAccountPayload(String paymentMethod, String id) {
super(paymentMethod, id); super(paymentMethod, id);
} }
@ -47,7 +47,7 @@ public final class CashByAtmAccountPayload extends PaymentAccountPayload {
// PROTO BUFFER // PROTO BUFFER
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
private CashByAtmAccountPayload(String paymentMethod, String id, private CashAtAtmAccountPayload(String paymentMethod, String id,
String extraInfo, String extraInfo,
long maxTradePeriod, long maxTradePeriod,
Map<String, String> excludeFromJsonDataMap) { Map<String, String> excludeFromJsonDataMap) {
@ -61,15 +61,15 @@ public final class CashByAtmAccountPayload extends PaymentAccountPayload {
@Override @Override
public Message toProtoMessage() { public Message toProtoMessage() {
return getPaymentAccountPayloadBuilder() return getPaymentAccountPayloadBuilder()
.setCashByAtmAccountPayload(protobuf.CashByAtmAccountPayload.newBuilder() .setCashAtAtmAccountPayload(protobuf.CashAtAtmAccountPayload.newBuilder()
.setExtraInfo(extraInfo)) .setExtraInfo(extraInfo))
.build(); .build();
} }
public static CashByAtmAccountPayload fromProto(protobuf.PaymentAccountPayload proto) { public static CashAtAtmAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
return new CashByAtmAccountPayload(proto.getPaymentMethodId(), return new CashAtAtmAccountPayload(proto.getPaymentMethodId(),
proto.getId(), proto.getId(),
proto.getCashByAtmAccountPayload().getExtraInfo(), proto.getCashAtAtmAccountPayload().getExtraInfo(),
proto.getMaxTradePeriod(), proto.getMaxTradePeriod(),
new HashMap<>(proto.getExcludeFromJsonDataMap())); new HashMap<>(proto.getExcludeFromJsonDataMap()));
} }

View File

@ -31,7 +31,7 @@ import haveno.core.payment.AmazonGiftCardAccount;
import haveno.core.payment.AustraliaPayidAccount; import haveno.core.payment.AustraliaPayidAccount;
import haveno.core.payment.BizumAccount; import haveno.core.payment.BizumAccount;
import haveno.core.payment.CapitualAccount; import haveno.core.payment.CapitualAccount;
import haveno.core.payment.CashByAtmAccount; import haveno.core.payment.CashAtAtmAccount;
import haveno.core.payment.PayByMailAccount; import haveno.core.payment.PayByMailAccount;
import haveno.core.payment.CashDepositAccount; import haveno.core.payment.CashDepositAccount;
import haveno.core.payment.CelPayAccount; import haveno.core.payment.CelPayAccount;
@ -163,7 +163,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
public static final String AMAZON_GIFT_CARD_ID = "AMAZON_GIFT_CARD"; public static final String AMAZON_GIFT_CARD_ID = "AMAZON_GIFT_CARD";
public static final String BLOCK_CHAINS_INSTANT_ID = "BLOCK_CHAINS_INSTANT"; public static final String BLOCK_CHAINS_INSTANT_ID = "BLOCK_CHAINS_INSTANT";
public static final String PAY_BY_MAIL_ID = "PAY_BY_MAIL"; public static final String PAY_BY_MAIL_ID = "PAY_BY_MAIL";
public static final String CASH_BY_ATM_ID = "CASH_BY_ATM"; public static final String CASH_AT_ATM_ID = "CASH_AT_ATM";
public static final String CAPITUAL_ID = "CAPITUAL"; public static final String CAPITUAL_ID = "CAPITUAL";
public static final String CELPAY_ID = "CELPAY"; public static final String CELPAY_ID = "CELPAY";
public static final String MONESE_ID = "MONESE"; public static final String MONESE_ID = "MONESE";
@ -226,7 +226,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
public static PaymentMethod AMAZON_GIFT_CARD; public static PaymentMethod AMAZON_GIFT_CARD;
public static PaymentMethod BLOCK_CHAINS_INSTANT; public static PaymentMethod BLOCK_CHAINS_INSTANT;
public static PaymentMethod PAY_BY_MAIL; public static PaymentMethod PAY_BY_MAIL;
public static PaymentMethod CASH_BY_ATM; public static PaymentMethod CASH_AT_ATM;
public static PaymentMethod CAPITUAL; public static PaymentMethod CAPITUAL;
public static PaymentMethod CELPAY; public static PaymentMethod CELPAY;
public static PaymentMethod MONESE; public static PaymentMethod MONESE;
@ -274,7 +274,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
// Global // Global
CASH_DEPOSIT = new PaymentMethod(CASH_DEPOSIT_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(CashDepositAccount.SUPPORTED_CURRENCIES)), CASH_DEPOSIT = new PaymentMethod(CASH_DEPOSIT_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(CashDepositAccount.SUPPORTED_CURRENCIES)),
PAY_BY_MAIL = new PaymentMethod(PAY_BY_MAIL_ID, 8 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(PayByMailAccount.SUPPORTED_CURRENCIES)), PAY_BY_MAIL = new PaymentMethod(PAY_BY_MAIL_ID, 8 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(PayByMailAccount.SUPPORTED_CURRENCIES)),
CASH_BY_ATM = new PaymentMethod(CASH_BY_ATM_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(CashByAtmAccount.SUPPORTED_CURRENCIES)), CASH_AT_ATM = new PaymentMethod(CASH_AT_ATM_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(CashAtAtmAccount.SUPPORTED_CURRENCIES)),
MONEY_GRAM = new PaymentMethod(MONEY_GRAM_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(MoneyGramAccount.SUPPORTED_CURRENCIES)), MONEY_GRAM = new PaymentMethod(MONEY_GRAM_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(MoneyGramAccount.SUPPORTED_CURRENCIES)),
WESTERN_UNION = new PaymentMethod(WESTERN_UNION_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(WesternUnionAccount.SUPPORTED_CURRENCIES)), WESTERN_UNION = new PaymentMethod(WESTERN_UNION_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_MID_RISK, getAssetCodes(WesternUnionAccount.SUPPORTED_CURRENCIES)),
NATIONAL_BANK = new PaymentMethod(NATIONAL_BANK_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(NationalBankAccount.SUPPORTED_CURRENCIES)), NATIONAL_BANK = new PaymentMethod(NATIONAL_BANK_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK, getAssetCodes(NationalBankAccount.SUPPORTED_CURRENCIES)),
@ -566,12 +566,12 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
} }
public static boolean isRoundedForAtmCash(String id) { public static boolean isRoundedForAtmCash(String id) {
return id.equals(PaymentMethod.CASH_BY_ATM_ID) || return id.equals(PaymentMethod.CASH_AT_ATM_ID) ||
id.equals(PaymentMethod.HAL_CASH_ID); id.equals(PaymentMethod.HAL_CASH_ID);
} }
public static boolean isFixedPriceOnly(String id) { public static boolean isFixedPriceOnly(String id) {
return id.equals(PaymentMethod.CASH_BY_ATM_ID) || return id.equals(PaymentMethod.CASH_AT_ATM_ID) ||
id.equals(PaymentMethod.HAL_CASH_ID); id.equals(PaymentMethod.HAL_CASH_ID);
} }
} }

View File

@ -30,7 +30,7 @@ import haveno.core.payment.payload.AustraliaPayidAccountPayload;
import haveno.core.payment.payload.BizumAccountPayload; import haveno.core.payment.payload.BizumAccountPayload;
import haveno.core.payment.payload.CapitualAccountPayload; import haveno.core.payment.payload.CapitualAccountPayload;
import haveno.core.payment.payload.CashAppAccountPayload; import haveno.core.payment.payload.CashAppAccountPayload;
import haveno.core.payment.payload.CashByAtmAccountPayload; import haveno.core.payment.payload.CashAtAtmAccountPayload;
import haveno.core.payment.payload.PayByMailAccountPayload; import haveno.core.payment.payload.PayByMailAccountPayload;
import haveno.core.payment.payload.CashDepositAccountPayload; import haveno.core.payment.payload.CashDepositAccountPayload;
import haveno.core.payment.payload.CelPayAccountPayload; import haveno.core.payment.payload.CelPayAccountPayload;
@ -202,8 +202,8 @@ public class CoreProtoResolver implements ProtoResolver {
return USPostalMoneyOrderAccountPayload.fromProto(proto); return USPostalMoneyOrderAccountPayload.fromProto(proto);
case PAY_BY_MAIL_ACCOUNT_PAYLOAD: case PAY_BY_MAIL_ACCOUNT_PAYLOAD:
return PayByMailAccountPayload.fromProto(proto); return PayByMailAccountPayload.fromProto(proto);
case CASH_BY_ATM_ACCOUNT_PAYLOAD: case CASH_AT_ATM_ACCOUNT_PAYLOAD:
return CashByAtmAccountPayload.fromProto(proto); return CashAtAtmAccountPayload.fromProto(proto);
case PROMPT_PAY_ACCOUNT_PAYLOAD: case PROMPT_PAY_ACCOUNT_PAYLOAD:
return PromptPayAccountPayload.fromProto(proto); return PromptPayAccountPayload.fromProto(proto);
case ADVANCED_CASH_ACCOUNT_PAYLOAD: case ADVANCED_CASH_ACCOUNT_PAYLOAD:

View File

@ -2950,11 +2950,11 @@ Any special terms/conditions; \n\
Any other details. Any other details.
payment.tradingRestrictions=Please review the maker's terms and conditions.\n\ payment.tradingRestrictions=Please review the maker's terms and conditions.\n\
If you do not meet the requirements do not take this trade. If you do not meet the requirements do not take this trade.
payment.cashByAtm.info=Cash at ATM: Cardless withdraw at ATM using code\n\n\ payment.cashAtAtm.info=Cash at ATM: Cardless withdraw at ATM using code\n\n\
1. List your accepted banks, regions, or other terms.\n\n\ 1. List your accepted banks, regions, or other terms.\n\n\
2. Chat with your peer trader to coordinate a time and share the withdraw code.\n\n\ 2. Chat with your peer trader to coordinate a time and share the withdraw code.\n\n\
If you cannot complete the transaction as specified in your trade contract, you may lose some (or all) of your security deposit. If you cannot complete the transaction as specified in your trade contract, you may lose some (or all) of your security deposit.
payment.cashByAtm.extraInfo.prompt=Please state on your offers: \n\n\ payment.cashAtAtm.extraInfo.prompt=Please state on your offers: \n\n\
Your accepted banks / locations; \n\ Your accepted banks / locations; \n\
Any special terms/conditions; \n\ Any special terms/conditions; \n\
Any other details. Any other details.
@ -3009,7 +3009,7 @@ SPECIFIC_BANKS=Transfers with specific banks
US_POSTAL_MONEY_ORDER=US Postal Money Order US_POSTAL_MONEY_ORDER=US Postal Money Order
CASH_DEPOSIT=Cash Deposit CASH_DEPOSIT=Cash Deposit
PAY_BY_MAIL=Pay By Mail PAY_BY_MAIL=Pay By Mail
CASH_BY_ATM=Cash by ATM CASH_AT_ATM=Cash at ATM
MONEY_GRAM=MoneyGram MONEY_GRAM=MoneyGram
WESTERN_UNION=Western Union WESTERN_UNION=Western Union
F2F=Face to face (in person) F2F=Face to face (in person)
@ -3029,7 +3029,7 @@ CASH_DEPOSIT_SHORT=Cash Deposit
# suppress inspection "UnusedProperty" # suppress inspection "UnusedProperty"
PAY_BY_MAIL_SHORT=Pay By Mail PAY_BY_MAIL_SHORT=Pay By Mail
# suppress inspection "UnusedProperty" # suppress inspection "UnusedProperty"
CASH_BY_ATM_SHORT=Cash By ATM CASH_AT_ATM_SHORT=Cash At ATM
# suppress inspection "UnusedProperty" # suppress inspection "UnusedProperty"
MONEY_GRAM_SHORT=MoneyGram MONEY_GRAM_SHORT=MoneyGram
# suppress inspection "UnusedProperty" # suppress inspection "UnusedProperty"

View File

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

View File

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

View File

@ -160,7 +160,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
private int gridRow = 0; private int gridRow = 0;
private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>(); private final HashMap<String, Boolean> paymentAccountWarningDisplayed = new HashMap<>();
private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed, private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed,
takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashByAtmWarningDisplayed; takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashAtAtmWarningDisplayed;
private SimpleBooleanProperty errorPopupDisplayed; private SimpleBooleanProperty errorPopupDisplayed;
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener; private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
@ -268,7 +268,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
maybeShowFasterPaymentsWarning(lastPaymentAccount); maybeShowFasterPaymentsWarning(lastPaymentAccount);
maybeShowAccountWarning(lastPaymentAccount, model.dataModel.isBuyOffer()); maybeShowAccountWarning(lastPaymentAccount, model.dataModel.isBuyOffer());
maybeShowPayByMailWarning(lastPaymentAccount, model.dataModel.getOffer()); maybeShowPayByMailWarning(lastPaymentAccount, model.dataModel.getOffer());
maybeShowCashByAtmWarning(lastPaymentAccount, model.dataModel.getOffer()); maybeShowCashAtAtmWarning(lastPaymentAccount, model.dataModel.getOffer());
if (!model.isRange()) { if (!model.isRange()) {
nextButton.setVisible(false); nextButton.setVisible(false);
@ -1136,10 +1136,10 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
} }
} }
private void maybeShowCashByAtmWarning(PaymentAccount paymentAccount, Offer offer) { private void maybeShowCashAtAtmWarning(PaymentAccount paymentAccount, Offer offer) {
if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_BY_ATM_ID) && if (paymentAccount.getPaymentMethod().getId().equals(PaymentMethod.CASH_AT_ATM_ID) &&
!cashByAtmWarningDisplayed && !offer.getExtraInfo().isEmpty()) { !cashAtAtmWarningDisplayed && !offer.getExtraInfo().isEmpty()) {
cashByAtmWarningDisplayed = true; cashAtAtmWarningDisplayed = true;
UserThread.runAfter(() -> { UserThread.runAfter(() -> {
new GenericMessageWindow() new GenericMessageWindow()
.preamble(Res.get("payment.tradingRestrictions")) .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.AustraliaPayidForm;
import haveno.desktop.components.paymentmethods.BizumForm; import haveno.desktop.components.paymentmethods.BizumForm;
import haveno.desktop.components.paymentmethods.CapitualForm; 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.PayByMailForm;
import haveno.desktop.components.paymentmethods.CashDepositForm; import haveno.desktop.components.paymentmethods.CashDepositForm;
import haveno.desktop.components.paymentmethods.CelPayForm; import haveno.desktop.components.paymentmethods.CelPayForm;
@ -300,8 +300,8 @@ public class BuyerStep2View extends TradeStepView {
case PaymentMethod.PAY_BY_MAIL_ID: case PaymentMethod.PAY_BY_MAIL_ID:
gridRow = PayByMailForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload); gridRow = PayByMailForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break; break;
case PaymentMethod.CASH_BY_ATM_ID: case PaymentMethod.CASH_AT_ATM_ID:
gridRow = CashByAtmForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload); gridRow = CashAtAtmForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);
break; break;
case PaymentMethod.MONEY_GRAM_ID: case PaymentMethod.MONEY_GRAM_ID:
gridRow = MoneyGramForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload); gridRow = MoneyGramForm.addFormForBuyer(gridPane, gridRow, paymentAccountPayload);

View File

@ -856,7 +856,7 @@ message PaymentAccountPayload {
CelPayAccountPayload cel_pay_account_payload = 37; CelPayAccountPayload cel_pay_account_payload = 37;
MoneseAccountPayload monese_account_payload = 38; MoneseAccountPayload monese_account_payload = 38;
VerseAccountPayload verse_account_payload = 39; VerseAccountPayload verse_account_payload = 39;
CashByAtmAccountPayload cash_by_atm_account_payload = 40; CashAtAtmAccountPayload cash_at_atm_account_payload = 40;
} }
} }
@ -1113,7 +1113,7 @@ message PayByMailAccountPayload {
string extra_info = 3; string extra_info = 3;
} }
message CashByAtmAccountPayload { message CashAtAtmAccountPayload {
string extra_info = 1; string extra_info = 1;
} }