From ec49e2f3273bc2bcb86b767b89152a63c03cfe34 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 5 Jun 2023 11:25:39 -0400 Subject: [PATCH] rename 'cash by atm' to 'cash at atm' --- ...yAtmAccount.java => CashAtAtmAccount.java} | 14 +++++----- .../core/payment/PaymentAccountFactory.java | 4 +-- ...load.java => CashAtAtmAccountPayload.java} | 14 +++++----- .../core/payment/payload/PaymentMethod.java | 12 ++++----- .../haveno/core/proto/CoreProtoResolver.java | 6 ++--- .../resources/i18n/displayStrings.properties | 8 +++--- ...{CashByAtmForm.java => CashAtAtmForm.java} | 26 +++++++++---------- .../TraditionalAccountsView.java | 14 +++++----- .../main/offer/takeoffer/TakeOfferView.java | 12 ++++----- .../steps/buyer/BuyerStep2View.java | 6 ++--- proto/src/main/proto/pb.proto | 4 +-- 11 files changed, 60 insertions(+), 60 deletions(-) rename core/src/main/java/haveno/core/payment/{CashByAtmAccount.java => CashAtAtmAccount.java} (81%) rename core/src/main/java/haveno/core/payment/payload/{CashByAtmAccountPayload.java => CashAtAtmAccountPayload.java} (86%) rename desktop/src/main/java/haveno/desktop/components/paymentmethods/{CashByAtmForm.java => CashAtAtmForm.java} (83%) diff --git a/core/src/main/java/haveno/core/payment/CashByAtmAccount.java b/core/src/main/java/haveno/core/payment/CashAtAtmAccount.java similarity index 81% rename from core/src/main/java/haveno/core/payment/CashByAtmAccount.java rename to core/src/main/java/haveno/core/payment/CashAtAtmAccount.java index b91bc78df5..4d1e3d4c6f 100644 --- a/core/src/main/java/haveno/core/payment/CashByAtmAccount.java +++ b/core/src/main/java/haveno/core/payment/CashAtAtmAccount.java @@ -20,14 +20,14 @@ package haveno.core.payment; import haveno.core.api.model.PaymentAccountFormField; import haveno.core.locale.CurrencyUtil; 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.PaymentMethod; import lombok.NonNull; import java.util.List; -public final class CashByAtmAccount extends PaymentAccount { +public final class CashAtAtmAccount extends PaymentAccount { public static final List SUPPORTED_CURRENCIES = CurrencyUtil.getAllFiatCurrencies(); @@ -35,13 +35,13 @@ public final class CashByAtmAccount extends PaymentAccount { PaymentAccountFormField.FieldId.EXTRA_INFO ); - public CashByAtmAccount() { - super(PaymentMethod.CASH_BY_ATM); + public CashAtAtmAccount() { + super(PaymentMethod.CASH_AT_ATM); } @Override protected PaymentAccountPayload createPayload() { - return new CashByAtmAccountPayload(paymentMethod.getId(), id); + return new CashAtAtmAccountPayload(paymentMethod.getId(), id); } @Override @@ -55,10 +55,10 @@ public final class CashByAtmAccount extends PaymentAccount { } public void setExtraInfo(String extraInfo) { - ((CashByAtmAccountPayload) paymentAccountPayload).setExtraInfo(extraInfo); + ((CashAtAtmAccountPayload) paymentAccountPayload).setExtraInfo(extraInfo); } public String getExtraInfo() { - return ((CashByAtmAccountPayload) paymentAccountPayload).getExtraInfo(); + return ((CashAtAtmAccountPayload) paymentAccountPayload).getExtraInfo(); } } diff --git a/core/src/main/java/haveno/core/payment/PaymentAccountFactory.java b/core/src/main/java/haveno/core/payment/PaymentAccountFactory.java index 3be7449d2b..109cbfb19f 100644 --- a/core/src/main/java/haveno/core/payment/PaymentAccountFactory.java +++ b/core/src/main/java/haveno/core/payment/PaymentAccountFactory.java @@ -76,8 +76,8 @@ public class PaymentAccountFactory { return new F2FAccount(); case PaymentMethod.PAY_BY_MAIL_ID: return new PayByMailAccount(); - case PaymentMethod.CASH_BY_ATM_ID: - return new CashByAtmAccount(); + case PaymentMethod.CASH_AT_ATM_ID: + return new CashAtAtmAccount(); case PaymentMethod.PROMPT_PAY_ID: return new PromptPayAccount(); case PaymentMethod.ADVANCED_CASH_ID: diff --git a/core/src/main/java/haveno/core/payment/payload/CashByAtmAccountPayload.java b/core/src/main/java/haveno/core/payment/payload/CashAtAtmAccountPayload.java similarity index 86% rename from core/src/main/java/haveno/core/payment/payload/CashByAtmAccountPayload.java rename to core/src/main/java/haveno/core/payment/payload/CashAtAtmAccountPayload.java index 00ebf24942..b77f3875b1 100644 --- a/core/src/main/java/haveno/core/payment/payload/CashByAtmAccountPayload.java +++ b/core/src/main/java/haveno/core/payment/payload/CashAtAtmAccountPayload.java @@ -35,10 +35,10 @@ import java.util.Map; @Setter @Getter @Slf4j -public final class CashByAtmAccountPayload extends PaymentAccountPayload { +public final class CashAtAtmAccountPayload extends PaymentAccountPayload { private String extraInfo = ""; - public CashByAtmAccountPayload(String paymentMethod, String id) { + public CashAtAtmAccountPayload(String paymentMethod, String id) { super(paymentMethod, id); } @@ -47,7 +47,7 @@ public final class CashByAtmAccountPayload extends PaymentAccountPayload { // PROTO BUFFER /////////////////////////////////////////////////////////////////////////////////////////// - private CashByAtmAccountPayload(String paymentMethod, String id, + private CashAtAtmAccountPayload(String paymentMethod, String id, String extraInfo, long maxTradePeriod, Map excludeFromJsonDataMap) { @@ -61,15 +61,15 @@ public final class CashByAtmAccountPayload extends PaymentAccountPayload { @Override public Message toProtoMessage() { return getPaymentAccountPayloadBuilder() - .setCashByAtmAccountPayload(protobuf.CashByAtmAccountPayload.newBuilder() + .setCashAtAtmAccountPayload(protobuf.CashAtAtmAccountPayload.newBuilder() .setExtraInfo(extraInfo)) .build(); } - public static CashByAtmAccountPayload fromProto(protobuf.PaymentAccountPayload proto) { - return new CashByAtmAccountPayload(proto.getPaymentMethodId(), + public static CashAtAtmAccountPayload fromProto(protobuf.PaymentAccountPayload proto) { + return new CashAtAtmAccountPayload(proto.getPaymentMethodId(), proto.getId(), - proto.getCashByAtmAccountPayload().getExtraInfo(), + proto.getCashAtAtmAccountPayload().getExtraInfo(), proto.getMaxTradePeriod(), new HashMap<>(proto.getExcludeFromJsonDataMap())); } diff --git a/core/src/main/java/haveno/core/payment/payload/PaymentMethod.java b/core/src/main/java/haveno/core/payment/payload/PaymentMethod.java index 151c7c7e66..bf4b484c35 100644 --- a/core/src/main/java/haveno/core/payment/payload/PaymentMethod.java +++ b/core/src/main/java/haveno/core/payment/payload/PaymentMethod.java @@ -31,7 +31,7 @@ import haveno.core.payment.AmazonGiftCardAccount; import haveno.core.payment.AustraliaPayidAccount; import haveno.core.payment.BizumAccount; import haveno.core.payment.CapitualAccount; -import haveno.core.payment.CashByAtmAccount; +import haveno.core.payment.CashAtAtmAccount; import haveno.core.payment.PayByMailAccount; import haveno.core.payment.CashDepositAccount; import haveno.core.payment.CelPayAccount; @@ -163,7 +163,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable { - 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); } } diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java b/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java index e654bfef97..e06cbf9843 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java @@ -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 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 paymentAccountWarningDisplayed = new HashMap<>(); private boolean offerDetailsWindowDisplayed, zelleWarningDisplayed, fasterPaymentsWarningDisplayed, - takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashByAtmWarningDisplayed; + takeOfferFromUnsignedAccountWarningDisplayed, payByMailWarningDisplayed, cashAtAtmWarningDisplayed; private SimpleBooleanProperty errorPopupDisplayed; private ChangeListener amountFocusedListener, getShowWalletFundedNotificationListener; @@ -268,7 +268,7 @@ public class TakeOfferView extends ActivatableViewAndModel { new GenericMessageWindow() .preamble(Res.get("payment.tradingRestrictions")) diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index a4acc38a88..37aaca27f6 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -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); diff --git a/proto/src/main/proto/pb.proto b/proto/src/main/proto/pb.proto index 6cfa4c57bd..37738fb033 100644 --- a/proto/src/main/proto/pb.proto +++ b/proto/src/main/proto/pb.proto @@ -856,7 +856,7 @@ message PaymentAccountPayload { CelPayAccountPayload cel_pay_account_payload = 37; MoneseAccountPayload monese_account_payload = 38; 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; } -message CashByAtmAccountPayload { +message CashAtAtmAccountPayload { string extra_info = 1; }