acceptedCountryCodes,
String holderName,
String city,
String state,
@@ -66,6 +68,7 @@ public class WesternUnionAccountPayload extends CountryBasedPaymentAccountPayloa
super(paymentMethodName,
id,
countryCode,
+ acceptedCountryCodes,
maxTradePeriod,
excludeFromJsonDataMap);
this.holderName = holderName;
@@ -97,6 +100,7 @@ public class WesternUnionAccountPayload extends CountryBasedPaymentAccountPayloa
return new WesternUnionAccountPayload(proto.getPaymentMethodId(),
proto.getId(),
countryBasedPaymentAccountPayload.getCountryCode(),
+ new ArrayList<>(countryBasedPaymentAccountPayload.getAcceptedCountryCodesList()),
westernUnionAccountPayload.getHolderName(),
westernUnionAccountPayload.getCity(),
westernUnionAccountPayload.getState(),
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/AccountNrValidator.java b/core/src/main/java/bisq/core/payment/validation/AccountNrValidator.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/AccountNrValidator.java
rename to core/src/main/java/bisq/core/payment/validation/AccountNrValidator.java
index a7b33bdc70..b1c2f4d47b 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/AccountNrValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/AccountNrValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/AdvancedCashValidator.java b/core/src/main/java/bisq/core/payment/validation/AdvancedCashValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/AdvancedCashValidator.java
rename to core/src/main/java/bisq/core/payment/validation/AdvancedCashValidator.java
index 07e687289d..c8c22a4649 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/AdvancedCashValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/AdvancedCashValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/AliPayValidator.java b/core/src/main/java/bisq/core/payment/validation/AliPayValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/AliPayValidator.java
rename to core/src/main/java/bisq/core/payment/validation/AliPayValidator.java
index 3b76dd0bf5..92dcc1f6b4 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/AliPayValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/AliPayValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidAccountNameValidator.java b/core/src/main/java/bisq/core/payment/validation/AustraliaPayidAccountNameValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidAccountNameValidator.java
rename to core/src/main/java/bisq/core/payment/validation/AustraliaPayidAccountNameValidator.java
index c43f4f746f..4f56d30688 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidAccountNameValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/AustraliaPayidAccountNameValidator.java
@@ -16,7 +16,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
import bisq.core.util.validation.RegexValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidValidator.java b/core/src/main/java/bisq/core/payment/validation/AustraliaPayidValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidValidator.java
rename to core/src/main/java/bisq/core/payment/validation/AustraliaPayidValidator.java
index 025ac3faa1..d1a9076342 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/AustraliaPayidValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/AustraliaPayidValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/BICValidator.java b/core/src/main/java/bisq/core/payment/validation/BICValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/BICValidator.java
rename to core/src/main/java/bisq/core/payment/validation/BICValidator.java
index cd57af0fcf..94015a3937 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/BICValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/BICValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/BankIdValidator.java b/core/src/main/java/bisq/core/payment/validation/BankIdValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/BankIdValidator.java
rename to core/src/main/java/bisq/core/payment/validation/BankIdValidator.java
index 7bf9579f7e..823e553c45 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/BankIdValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/BankIdValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/BankValidator.java b/core/src/main/java/bisq/core/payment/validation/BankValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/BankValidator.java
rename to core/src/main/java/bisq/core/payment/validation/BankValidator.java
index 9eba84404f..fabaaed684 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/BankValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/BankValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/BranchIdValidator.java b/core/src/main/java/bisq/core/payment/validation/BranchIdValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/BranchIdValidator.java
rename to core/src/main/java/bisq/core/payment/validation/BranchIdValidator.java
index 0e049f6401..71bba899db 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/BranchIdValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/BranchIdValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/BtcValidator.java b/core/src/main/java/bisq/core/payment/validation/BtcValidator.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/BtcValidator.java
rename to core/src/main/java/bisq/core/payment/validation/BtcValidator.java
index 5bd7f44b58..0d03ecf69c 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/BtcValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/BtcValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.btc.wallet.Restrictions;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/CapitualValidator.java b/core/src/main/java/bisq/core/payment/validation/CapitualValidator.java
similarity index 94%
rename from desktop/src/main/java/bisq/desktop/util/validation/CapitualValidator.java
rename to core/src/main/java/bisq/core/payment/validation/CapitualValidator.java
index f94b933340..19c310a8c2 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/CapitualValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/CapitualValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/ChaseQuickPayValidator.java b/core/src/main/java/bisq/core/payment/validation/ChaseQuickPayValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/ChaseQuickPayValidator.java
rename to core/src/main/java/bisq/core/payment/validation/ChaseQuickPayValidator.java
index df27df8c5d..218d0f9a5b 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/ChaseQuickPayValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/ChaseQuickPayValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/CountryCallingCodes.java b/core/src/main/java/bisq/core/payment/validation/CountryCallingCodes.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/CountryCallingCodes.java
rename to core/src/main/java/bisq/core/payment/validation/CountryCallingCodes.java
index 7fc60e5337..f1e0e83f46 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/CountryCallingCodes.java
+++ b/core/src/main/java/bisq/core/payment/validation/CountryCallingCodes.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import java.util.Map;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/ClearXchangeValidator.java b/core/src/main/java/bisq/core/payment/validation/EmailOrMobileNrValidator.java
similarity index 92%
rename from desktop/src/main/java/bisq/desktop/util/validation/ClearXchangeValidator.java
rename to core/src/main/java/bisq/core/payment/validation/EmailOrMobileNrValidator.java
index cf4b5858e2..ceb6505470 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/ClearXchangeValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/EmailOrMobileNrValidator.java
@@ -15,11 +15,11 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
-public final class ClearXchangeValidator extends InputValidator {
+public final class EmailOrMobileNrValidator extends InputValidator {
private final EmailValidator emailValidator;
@@ -27,7 +27,7 @@ public final class ClearXchangeValidator extends InputValidator {
// Public methods
///////////////////////////////////////////////////////////////////////////////////////////
- public ClearXchangeValidator() {
+ public EmailOrMobileNrValidator() {
emailValidator = new EmailValidator();
}
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/EmailValidator.java b/core/src/main/java/bisq/core/payment/validation/EmailValidator.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/EmailValidator.java
rename to core/src/main/java/bisq/core/payment/validation/EmailValidator.java
index c6ce039532..eb49e0fc24 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/EmailValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/EmailValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/F2FValidator.java b/core/src/main/java/bisq/core/payment/validation/F2FValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/F2FValidator.java
rename to core/src/main/java/bisq/core/payment/validation/F2FValidator.java
index 8703e8085b..00be30d76e 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/F2FValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/F2FValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/FiatVolumeValidator.java b/core/src/main/java/bisq/core/payment/validation/FiatVolumeValidator.java
similarity index 91%
rename from desktop/src/main/java/bisq/desktop/util/validation/FiatVolumeValidator.java
rename to core/src/main/java/bisq/core/payment/validation/FiatVolumeValidator.java
index 1674c96574..c09e14a142 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/FiatVolumeValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/FiatVolumeValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.MonetaryValidator;
@@ -23,12 +23,12 @@ import javax.inject.Inject;
public class FiatVolumeValidator extends MonetaryValidator {
@Override
- protected double getMinValue() {
+ public double getMinValue() {
return 0.01;
}
@Override
- protected double getMaxValue() {
+ public double getMaxValue() {
// Hard to say what the max value should be (zimbabwe dollar....)?
// Lets set it to Double.MAX_VALUE until we find some reasonable number
return Double.MAX_VALUE;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/HalCashValidator.java b/core/src/main/java/bisq/core/payment/validation/HalCashValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/HalCashValidator.java
rename to core/src/main/java/bisq/core/payment/validation/HalCashValidator.java
index d4930021fe..fe13bcfa71 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/HalCashValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/HalCashValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/IBANValidator.java b/core/src/main/java/bisq/core/payment/validation/IBANValidator.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/IBANValidator.java
rename to core/src/main/java/bisq/core/payment/validation/IBANValidator.java
index cb44e5d827..503b03633c 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/IBANValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/IBANValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferAnswerValidator.java b/core/src/main/java/bisq/core/payment/validation/InteracETransferAnswerValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/InteracETransferAnswerValidator.java
rename to core/src/main/java/bisq/core/payment/validation/InteracETransferAnswerValidator.java
index aa28b5d734..7f697bdae0 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferAnswerValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/InteracETransferAnswerValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferQuestionValidator.java b/core/src/main/java/bisq/core/payment/validation/InteracETransferQuestionValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/InteracETransferQuestionValidator.java
rename to core/src/main/java/bisq/core/payment/validation/InteracETransferQuestionValidator.java
index bd7374e097..616e469297 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferQuestionValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/InteracETransferQuestionValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferValidator.java b/core/src/main/java/bisq/core/payment/validation/InteracETransferValidator.java
similarity index 99%
rename from desktop/src/main/java/bisq/desktop/util/validation/InteracETransferValidator.java
rename to core/src/main/java/bisq/core/payment/validation/InteracETransferValidator.java
index 4a85762170..e124a68d17 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/InteracETransferValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/InteracETransferValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNameValidator.java b/core/src/main/java/bisq/core/payment/validation/JapanBankAccountNameValidator.java
similarity index 94%
rename from desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNameValidator.java
rename to core/src/main/java/bisq/core/payment/validation/JapanBankAccountNameValidator.java
index 4d82f3e0a5..a6a3f491f7 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNameValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/JapanBankAccountNameValidator.java
@@ -15,10 +15,9 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
-
-import bisq.desktop.components.paymentmethods.data.JapanBankData;
+package bisq.core.payment.validation;
+import bisq.core.payment.JapanBankData;
import bisq.core.util.validation.InputValidator;
import bisq.core.util.validation.RegexValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNumberValidator.java b/core/src/main/java/bisq/core/payment/validation/JapanBankAccountNumberValidator.java
similarity index 93%
rename from desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNumberValidator.java
rename to core/src/main/java/bisq/core/payment/validation/JapanBankAccountNumberValidator.java
index 018af6954b..86882c31af 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankAccountNumberValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/JapanBankAccountNumberValidator.java
@@ -15,10 +15,10 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
-import bisq.desktop.components.paymentmethods.data.JapanBankData;
+import bisq.core.payment.JapanBankData;
public final class JapanBankAccountNumberValidator extends InputValidator
{
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchCodeValidator.java b/core/src/main/java/bisq/core/payment/validation/JapanBankBranchCodeValidator.java
similarity index 91%
rename from desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchCodeValidator.java
rename to core/src/main/java/bisq/core/payment/validation/JapanBankBranchCodeValidator.java
index d3cc408c00..f9a90eff9f 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchCodeValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/JapanBankBranchCodeValidator.java
@@ -15,10 +15,10 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
-import bisq.desktop.components.paymentmethods.data.JapanBankData;
+import bisq.core.payment.JapanBankData;
public final class JapanBankBranchCodeValidator extends InputValidator
{
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchNameValidator.java b/core/src/main/java/bisq/core/payment/validation/JapanBankBranchNameValidator.java
similarity index 94%
rename from desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchNameValidator.java
rename to core/src/main/java/bisq/core/payment/validation/JapanBankBranchNameValidator.java
index 7fd19aab93..9750490fae 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankBranchNameValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/JapanBankBranchNameValidator.java
@@ -15,9 +15,9 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
-import bisq.desktop.components.paymentmethods.data.JapanBankData;
+import bisq.core.payment.JapanBankData;
import bisq.core.util.validation.InputValidator;
import bisq.core.util.validation.RegexValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankTransferValidator.java b/core/src/main/java/bisq/core/payment/validation/JapanBankTransferValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/JapanBankTransferValidator.java
rename to core/src/main/java/bisq/core/payment/validation/JapanBankTransferValidator.java
index 6c20a5fd94..1616db35ec 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/JapanBankTransferValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/JapanBankTransferValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/LengthValidator.java b/core/src/main/java/bisq/core/payment/validation/LengthValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/LengthValidator.java
rename to core/src/main/java/bisq/core/payment/validation/LengthValidator.java
index 7e1dc3e141..e5572b9288 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/LengthValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/LengthValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/MoneyBeamValidator.java b/core/src/main/java/bisq/core/payment/validation/MoneyBeamValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/MoneyBeamValidator.java
rename to core/src/main/java/bisq/core/payment/validation/MoneyBeamValidator.java
index 259fe26ecb..bb99e90406 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/MoneyBeamValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/MoneyBeamValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/NationalAccountIdValidator.java b/core/src/main/java/bisq/core/payment/validation/NationalAccountIdValidator.java
similarity index 95%
rename from desktop/src/main/java/bisq/desktop/util/validation/NationalAccountIdValidator.java
rename to core/src/main/java/bisq/core/payment/validation/NationalAccountIdValidator.java
index c730c01926..9b47db5212 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/NationalAccountIdValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/NationalAccountIdValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/PercentageNumberValidator.java b/core/src/main/java/bisq/core/payment/validation/PercentageNumberValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/PercentageNumberValidator.java
rename to core/src/main/java/bisq/core/payment/validation/PercentageNumberValidator.java
index 83e14db61c..0c99fe3edf 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/PercentageNumberValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/PercentageNumberValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.NumberValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/PerfectMoneyValidator.java b/core/src/main/java/bisq/core/payment/validation/PerfectMoneyValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/PerfectMoneyValidator.java
rename to core/src/main/java/bisq/core/payment/validation/PerfectMoneyValidator.java
index 1ac5b3af5c..9bad62b80d 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/PerfectMoneyValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/PerfectMoneyValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java b/core/src/main/java/bisq/core/payment/validation/PhoneNumberValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java
rename to core/src/main/java/bisq/core/payment/validation/PhoneNumberValidator.java
index ae580c2121..9a94ea7d0d 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/PhoneNumberValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
@@ -17,7 +17,7 @@ import javax.annotation.Nullable;
* Area codes and mobile provider codes are not validated, but all numbers following
* calling codes are included in the normalized number.
*
- * @see bisq.desktop.util.validation.CountryCallingCodes
+ * @see bisq.core.payment.validation.CountryCallingCodes
*/
public class PhoneNumberValidator extends InputValidator {
/**
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/PopmoneyValidator.java b/core/src/main/java/bisq/core/payment/validation/PopmoneyValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/PopmoneyValidator.java
rename to core/src/main/java/bisq/core/payment/validation/PopmoneyValidator.java
index 7570aca330..45054c9270 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/PopmoneyValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/PopmoneyValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/PromptPayValidator.java b/core/src/main/java/bisq/core/payment/validation/PromptPayValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/PromptPayValidator.java
rename to core/src/main/java/bisq/core/payment/validation/PromptPayValidator.java
index 52224f7153..87b39a034c 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/PromptPayValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/PromptPayValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/RevolutValidator.java b/core/src/main/java/bisq/core/payment/validation/RevolutValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/RevolutValidator.java
rename to core/src/main/java/bisq/core/payment/validation/RevolutValidator.java
index 4eeac7f7f4..dacbcf7790 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/RevolutValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/RevolutValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
public final class RevolutValidator extends LengthValidator {
public RevolutValidator() {
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/SecurityDepositValidator.java b/core/src/main/java/bisq/core/payment/validation/SecurityDepositValidator.java
similarity index 98%
rename from desktop/src/main/java/bisq/desktop/util/validation/SecurityDepositValidator.java
rename to core/src/main/java/bisq/core/payment/validation/SecurityDepositValidator.java
index 2ae725d781..9755f8dcda 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/SecurityDepositValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/SecurityDepositValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.btc.wallet.Restrictions;
import bisq.core.locale.Res;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/SepaIBANValidator.java b/core/src/main/java/bisq/core/payment/validation/SepaIBANValidator.java
similarity index 95%
rename from desktop/src/main/java/bisq/desktop/util/validation/SepaIBANValidator.java
rename to core/src/main/java/bisq/core/payment/validation/SepaIBANValidator.java
index 3541e397e7..11682f1d5a 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/SepaIBANValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/SepaIBANValidator.java
@@ -1,4 +1,4 @@
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/SwishValidator.java b/core/src/main/java/bisq/core/payment/validation/SwishValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/SwishValidator.java
rename to core/src/main/java/bisq/core/payment/validation/SwishValidator.java
index 0aadc087a0..358eba7294 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/SwishValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/SwishValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
public final class SwishValidator extends PhoneNumberValidator {
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/TransferwiseValidator.java b/core/src/main/java/bisq/core/payment/validation/TransferwiseValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/TransferwiseValidator.java
rename to core/src/main/java/bisq/core/payment/validation/TransferwiseValidator.java
index baf701c539..cec0fad5c6 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/TransferwiseValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/TransferwiseValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/USPostalMoneyOrderValidator.java b/core/src/main/java/bisq/core/payment/validation/USPostalMoneyOrderValidator.java
similarity index 97%
rename from desktop/src/main/java/bisq/desktop/util/validation/USPostalMoneyOrderValidator.java
rename to core/src/main/java/bisq/core/payment/validation/USPostalMoneyOrderValidator.java
index 908d421876..c9253fef91 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/USPostalMoneyOrderValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/USPostalMoneyOrderValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/UpholdValidator.java b/core/src/main/java/bisq/core/payment/validation/UpholdValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/UpholdValidator.java
rename to core/src/main/java/bisq/core/payment/validation/UpholdValidator.java
index 27f917301e..afbbe91d8c 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/UpholdValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/UpholdValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/util/validation/WeChatPayValidator.java b/core/src/main/java/bisq/core/payment/validation/WeChatPayValidator.java
similarity index 96%
rename from desktop/src/main/java/bisq/desktop/util/validation/WeChatPayValidator.java
rename to core/src/main/java/bisq/core/payment/validation/WeChatPayValidator.java
index 293db54ac5..5f4bb208bc 100644
--- a/desktop/src/main/java/bisq/desktop/util/validation/WeChatPayValidator.java
+++ b/core/src/main/java/bisq/core/payment/validation/WeChatPayValidator.java
@@ -15,7 +15,7 @@
* along with Haveno. If not, see .
*/
-package bisq.desktop.util.validation;
+package bisq.core.payment.validation;
import bisq.core.util.validation.InputValidator;
diff --git a/core/src/main/java/bisq/core/util/validation/AltcoinValidator.java b/core/src/main/java/bisq/core/util/validation/AltcoinValidator.java
index 890073f824..593c6f1d3d 100644
--- a/core/src/main/java/bisq/core/util/validation/AltcoinValidator.java
+++ b/core/src/main/java/bisq/core/util/validation/AltcoinValidator.java
@@ -21,12 +21,12 @@ import javax.inject.Inject;
public class AltcoinValidator extends MonetaryValidator {
@Override
- protected double getMinValue() {
+ public double getMinValue() {
return 0.00000001;
}
@Override
- protected double getMaxValue() {
+ public double getMaxValue() {
// hard to say what the max value should be with altcoins
return 100_000_000;
}
diff --git a/core/src/main/java/bisq/core/util/validation/FiatPriceValidator.java b/core/src/main/java/bisq/core/util/validation/FiatPriceValidator.java
index 5986fae545..3f7b162f2b 100644
--- a/core/src/main/java/bisq/core/util/validation/FiatPriceValidator.java
+++ b/core/src/main/java/bisq/core/util/validation/FiatPriceValidator.java
@@ -21,12 +21,12 @@ import javax.inject.Inject;
public class FiatPriceValidator extends MonetaryValidator {
@Override
- protected double getMinValue() {
+ public double getMinValue() {
return 0.0001;
}
@Override
- protected double getMaxValue() {
+ public double getMaxValue() {
// Hard to say what the max value should be (zimbabwe dollar....)?
// Lets set it to Double.MAX_VALUE until we find some reasonable number
return Double.MAX_VALUE;
diff --git a/core/src/main/java/bisq/core/util/validation/MonetaryValidator.java b/core/src/main/java/bisq/core/util/validation/MonetaryValidator.java
index 3513aa0800..2bfa5cff06 100644
--- a/core/src/main/java/bisq/core/util/validation/MonetaryValidator.java
+++ b/core/src/main/java/bisq/core/util/validation/MonetaryValidator.java
@@ -22,10 +22,10 @@ import javax.inject.Inject;
public abstract class MonetaryValidator extends NumberValidator {
- protected abstract double getMinValue();
+ public abstract double getMinValue();
@SuppressWarnings("SameReturnValue")
- protected abstract double getMaxValue();
+ public abstract double getMaxValue();
@Inject
public MonetaryValidator() {
diff --git a/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
index ca901ea701..dc99dde2a4 100644
--- a/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
@@ -18,6 +18,8 @@
package bisq.daemon.grpc;
import bisq.core.api.CoreApi;
+import bisq.core.api.model.PaymentAccountForm;
+import bisq.core.api.model.PaymentAccountFormField;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
@@ -33,7 +35,8 @@ import bisq.proto.grpc.GetPaymentAccountsReply;
import bisq.proto.grpc.GetPaymentAccountsRequest;
import bisq.proto.grpc.GetPaymentMethodsReply;
import bisq.proto.grpc.GetPaymentMethodsRequest;
-
+import bisq.proto.grpc.ValidateFormFieldReply;
+import bisq.proto.grpc.ValidateFormFieldRequest;
import io.grpc.ServerInterceptor;
import io.grpc.stub.StreamObserver;
@@ -47,7 +50,6 @@ import lombok.extern.slf4j.Slf4j;
import static bisq.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor;
import static bisq.proto.grpc.PaymentAccountsGrpc.*;
-import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
@@ -71,7 +73,7 @@ class GrpcPaymentAccountsService extends PaymentAccountsImplBase {
public void createPaymentAccount(CreatePaymentAccountRequest req,
StreamObserver responseObserver) {
try {
- PaymentAccount paymentAccount = coreApi.createPaymentAccount(req.getPaymentAccountForm());
+ PaymentAccount paymentAccount = coreApi.createPaymentAccount(PaymentAccountForm.fromProto(req.getPaymentAccountForm()));
var reply = CreatePaymentAccountReply.newBuilder()
.setPaymentAccount(paymentAccount.toProtoMessage())
.build();
@@ -118,9 +120,9 @@ class GrpcPaymentAccountsService extends PaymentAccountsImplBase {
public void getPaymentAccountForm(GetPaymentAccountFormRequest req,
StreamObserver responseObserver) {
try {
- var paymentAccountFormJson = coreApi.getPaymentAccountForm(req.getPaymentMethodId());
+ var form = coreApi.getPaymentAccountForm(req.getPaymentMethodId());
var reply = GetPaymentAccountFormReply.newBuilder()
- .setPaymentAccountFormJson(paymentAccountFormJson)
+ .setPaymentAccountForm(form.toProtoMessage())
.build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
@@ -162,6 +164,19 @@ class GrpcPaymentAccountsService extends PaymentAccountsImplBase {
exceptionHandler.handleException(log, cause, responseObserver);
}
}
+
+ @Override
+ public void validateFormField(ValidateFormFieldRequest req,
+ StreamObserver responseObserver) {
+ try {
+ coreApi.validateFormField(PaymentAccountForm.fromProto(req.getForm()), PaymentAccountFormField.FieldId.fromProto(req.getFieldId()), req.getValue());
+ var reply = ValidateFormFieldReply.newBuilder().build();
+ responseObserver.onNext(reply);
+ responseObserver.onCompleted();
+ } catch (Throwable cause) {
+ exceptionHandler.handleException(log, cause, responseObserver);
+ }
+ }
final ServerInterceptor[] interceptors() {
Optional rateMeteringInterceptor = rateMeteringInterceptor();
@@ -173,11 +188,11 @@ class GrpcPaymentAccountsService extends PaymentAccountsImplBase {
return getCustomRateMeteringInterceptor(coreApi.getConfig().appDataDir, this.getClass())
.or(() -> Optional.of(CallRateMeteringInterceptor.valueOf(
new HashMap<>() {{
- put(getCreatePaymentAccountMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));
- put(getCreateCryptoCurrencyPaymentAccountMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));
- put(getGetPaymentAccountsMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));
- put(getGetPaymentMethodsMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));
- put(getGetPaymentAccountFormMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));
+ put(getCreatePaymentAccountMethod().getFullMethodName(), new GrpcCallRateMeter(100, SECONDS));
+ put(getCreateCryptoCurrencyPaymentAccountMethod().getFullMethodName(), new GrpcCallRateMeter(100, SECONDS));
+ put(getGetPaymentAccountsMethod().getFullMethodName(), new GrpcCallRateMeter(100, SECONDS));
+ put(getGetPaymentMethodsMethod().getFullMethodName(), new GrpcCallRateMeter(100, SECONDS));
+ put(getGetPaymentAccountFormMethod().getFullMethodName(), new GrpcCallRateMeter(100, SECONDS));
}}
)));
}
diff --git a/desktop/src/main/java/bisq/desktop/components/InputTextField.java b/desktop/src/main/java/bisq/desktop/components/InputTextField.java
index edd9c93b84..edaee3e712 100644
--- a/desktop/src/main/java/bisq/desktop/components/InputTextField.java
+++ b/desktop/src/main/java/bisq/desktop/components/InputTextField.java
@@ -18,11 +18,9 @@
package bisq.desktop.components;
-import bisq.desktop.util.validation.JFXInputValidator;
-
import bisq.core.locale.Res;
import bisq.core.util.validation.InputValidator;
-
+import bisq.desktop.util.validation.JFXInputValidator;
import com.jfoenix.controls.JFXTextField;
import javafx.scene.control.Skin;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AdvancedCashForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AdvancedCashForm.java
index 6937ab1614..a1e82cdc82 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AdvancedCashForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AdvancedCashForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.AdvancedCashValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.AdvancedCashAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.AdvancedCashAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.AdvancedCashValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java
index 90a96c4822..97fdc1d8c2 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AliPayForm.java
@@ -17,14 +17,13 @@
package bisq.desktop.components.paymentmethods;
-import bisq.desktop.util.validation.AliPayValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.AliPayAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.AliPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.AliPayValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AustraliaPayidForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AustraliaPayidForm.java
index 1101a9725b..a19d83436d 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/AustraliaPayidForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/AustraliaPayidForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.AustraliaPayidValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.AustraliaPayidAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.AustraliaPayidAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.AustraliaPayidValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CapitualForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CapitualForm.java
index 939f630ace..890dc40de3 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CapitualForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CapitualForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.CapitualValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.CapitualAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.CapitualAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.CapitualValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java
index b3ad552833..c8a4c042b4 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CashDepositForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Country;
@@ -33,6 +31,7 @@ import bisq.core.payment.CountryBasedPaymentAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.CashDepositAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CelPayForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CelPayForm.java
index e4f2167460..f796e2ef70 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/CelPayForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/CelPayForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.CelPayAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.CelPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java
index f8ca113132..ce601124e9 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/ChaseQuickPayForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.ChaseQuickPayValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.ChaseQuickPayAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.ChaseQuickPayAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.ChaseQuickPayValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java
index 7fa5d92a14..2eb85671a5 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/ClearXchangeForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.ClearXchangeValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.ClearXchangeAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.ClearXchangeAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.EmailOrMobileNrValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
@@ -40,7 +39,7 @@ import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
public class ClearXchangeForm extends PaymentMethodForm {
private final ClearXchangeAccount clearXchangeAccount;
- private final ClearXchangeValidator clearXchangeValidator;
+ private final EmailOrMobileNrValidator clearXchangeValidator;
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountPayload paymentAccountPayload) {
addCompactTopLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.get("payment.account.owner"),
@@ -50,7 +49,7 @@ public class ClearXchangeForm extends PaymentMethodForm {
return gridRow;
}
- public ClearXchangeForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, ClearXchangeValidator clearXchangeValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
+ public ClearXchangeForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, EmailOrMobileNrValidator clearXchangeValidator, InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.clearXchangeAccount = (ClearXchangeAccount) paymentAccount;
this.clearXchangeValidator = clearXchangeValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java
index 93c8eceb8f..e8057e5a97 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/F2FForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.F2FValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
@@ -34,6 +32,7 @@ import bisq.core.payment.F2FAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.F2FAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.F2FValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java
index 153043c0ff..4601d092d6 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/FasterPaymentsForm.java
@@ -19,9 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.AccountNrValidator;
-import bisq.desktop.util.validation.BranchIdValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -29,6 +26,8 @@ import bisq.core.payment.FasterPaymentsAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.FasterPaymentsAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.AccountNrValidator;
+import bisq.core.payment.validation.BranchIdValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/GeneralBankForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/GeneralBankForm.java
index 75d76c81bf..62dbfbb58d 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/GeneralBankForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/GeneralBankForm.java
@@ -1,16 +1,15 @@
package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
-import bisq.desktop.util.validation.AccountNrValidator;
-import bisq.desktop.util.validation.BankIdValidator;
-import bisq.desktop.util.validation.BranchIdValidator;
-import bisq.desktop.util.validation.NationalAccountIdValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.BankAccountPayload;
+import bisq.core.payment.validation.AccountNrValidator;
+import bisq.core.payment.validation.BankIdValidator;
+import bisq.core.payment.validation.BranchIdValidator;
+import bisq.core.payment.validation.NationalAccountIdValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/HalCashForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/HalCashForm.java
index b605e1945b..d63e970815 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/HalCashForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/HalCashForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.HalCashValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.HalCashAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.HalCashAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.HalCashValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java
index b91793e98f..334a92e17a 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/InteracETransferForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.InteracETransferValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.InteracETransferAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.InteracETransferAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.InteracETransferValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/JapanBankTransferForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/JapanBankTransferForm.java
index 40bad1b307..b317b97f1e 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/JapanBankTransferForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/JapanBankTransferForm.java
@@ -19,20 +19,19 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.AutocompleteComboBox;
import bisq.desktop.components.InputTextField;
-import bisq.desktop.components.paymentmethods.data.JapanBankData;
-import bisq.desktop.util.validation.JapanBankAccountNameValidator;
-import bisq.desktop.util.validation.JapanBankAccountNumberValidator;
-import bisq.desktop.util.validation.JapanBankBranchCodeValidator;
-import bisq.desktop.util.validation.JapanBankBranchNameValidator;
-import bisq.desktop.util.validation.LengthValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.payment.JapanBankAccount;
+import bisq.core.payment.JapanBankData;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.JapanBankAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.JapanBankAccountNameValidator;
+import bisq.core.payment.validation.JapanBankAccountNumberValidator;
+import bisq.core.payment.validation.JapanBankBranchCodeValidator;
+import bisq.core.payment.validation.JapanBankBranchNameValidator;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
import bisq.core.util.validation.RegexValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java
index cc5282e0a4..0b1f867379 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyBeamForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.MoneyBeamValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.MoneyBeamAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.MoneyBeamAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.MoneyBeamValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyGramForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyGramForm.java
index 684354903a..3fceb53e15 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyGramForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/MoneyGramForm.java
@@ -20,8 +20,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Country;
@@ -31,6 +29,7 @@ import bisq.core.payment.MoneyGramAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.MoneyGramAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
@@ -171,7 +170,7 @@ public class MoneyGramForm extends PaymentMethodForm {
@Override
protected void autoFillNameTextField() {
- setAccountNameWithString(moneyGramAccountPayload.getHolderName());
+ setAccountNameWithString(moneyGramAccountPayload.getHolderName() == null ? "" : moneyGramAccountPayload.getHolderName());
}
@Override
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaxumForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaxumForm.java
index 14f68bced2..e693eb0862 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaxumForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PaxumForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaxumAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaxumAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PayseraForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PayseraForm.java
index ef4e829448..ff605d91e9 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PayseraForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PayseraForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PayseraAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PayseraAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java
index 63075b346d..1d8a30aa76 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PerfectMoneyForm.java
@@ -17,8 +17,6 @@
package bisq.desktop.components.paymentmethods;
-import bisq.desktop.util.validation.PerfectMoneyValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.FiatCurrency;
import bisq.core.locale.Res;
@@ -26,6 +24,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PerfectMoneyAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PerfectMoneyAccountPayload;
+import bisq.core.payment.validation.PerfectMoneyValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java
index e69d0b9e83..d8cb6100f9 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PopmoneyForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.PopmoneyValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PopmoneyAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PopmoneyAccountPayload;
+import bisq.core.payment.validation.PopmoneyValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PromptPayForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PromptPayForm.java
index 732e33dcb0..e030572e9f 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/PromptPayForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/PromptPayForm.java
@@ -18,8 +18,6 @@
package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
-import bisq.desktop.util.validation.PromptPayValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -27,6 +25,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.PromptPayAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PromptPayAccountPayload;
+import bisq.core.payment.validation.PromptPayValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java
index 97a0102c7f..d157741def 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/RevolutForm.java
@@ -20,14 +20,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.RevolutValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.RevolutAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.RevolutAccountPayload;
+import bisq.core.payment.validation.RevolutValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java
index 5ce4a68fdd..cf1077bf84 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaForm.java
@@ -17,11 +17,8 @@
package bisq.desktop.components.paymentmethods;
-import bisq.desktop.components.InputTextField;
-import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.normalization.IBANNormalizer;
-import bisq.desktop.util.validation.BICValidator;
-import bisq.desktop.util.validation.SepaIBANValidator;
+import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextField;
+import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Country;
@@ -32,21 +29,20 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.SepaAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.SepaAccountPayload;
+import bisq.core.payment.validation.BICValidator;
+import bisq.core.payment.validation.SepaIBANValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
-
+import bisq.desktop.components.InputTextField;
+import bisq.desktop.util.FormBuilder;
+import bisq.desktop.util.normalization.IBANNormalizer;
+import java.util.List;
+import java.util.Optional;
+import javafx.collections.FXCollections;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextFormatter;
import javafx.scene.layout.GridPane;
-import javafx.collections.FXCollections;
-
-import java.util.List;
-import java.util.Optional;
-
-import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextField;
-import static bisq.desktop.util.FormBuilder.addCompactTopLabelTextFieldWithCopyIcon;
-
public class SepaForm extends GeneralSepaForm {
public static int addFormForBuyer(GridPane gridPane, int gridRow,
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java
index 8d359c4af7..b601489dbe 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SepaInstantForm.java
@@ -20,9 +20,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.normalization.IBANNormalizer;
-import bisq.desktop.util.validation.BICValidator;
-import bisq.desktop.util.validation.SepaIBANValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
@@ -32,6 +29,8 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.SepaInstantAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.SepaInstantAccountPayload;
+import bisq.core.payment.validation.BICValidator;
+import bisq.core.payment.validation.SepaIBANValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwiftForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwiftForm.java
index b559412249..a6a1e175f2 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwiftForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwiftForm.java
@@ -23,8 +23,6 @@ import bisq.desktop.components.InputTextField;
import bisq.desktop.main.overlays.windows.SwiftPaymentDetails;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.LengthValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil;
@@ -33,6 +31,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.SwiftAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.SwiftAccountPayload;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.trade.Trade;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java
index 2777ea95d2..9a73322e58 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/SwishForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.SwishValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.SwishAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.SwishAccountPayload;
+import bisq.core.payment.validation.SwishValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TikkieForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TikkieForm.java
index abd9844476..94b1735658 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TikkieForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TikkieForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.IBANValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
@@ -28,6 +26,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.TikkieAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.TikkieAccountPayload;
+import bisq.core.payment.validation.IBANValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseForm.java
index 0dcccd7238..927613a0ec 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.TransferwiseValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.TransferwiseAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.TransferwiseAccountPayload;
+import bisq.core.payment.validation.TransferwiseValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseUsdForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseUsdForm.java
index b1a5932705..e3bfadc429 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseUsdForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/TransferwiseUsdForm.java
@@ -19,9 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.EmailValidator;
-import bisq.desktop.util.validation.LengthValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
@@ -29,6 +26,8 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.TransferwiseUsdAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.TransferwiseUsdAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java
index a95af184d6..ea089b6826 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/USPostalMoneyOrderForm.java
@@ -19,8 +19,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.USPostalMoneyOrderValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -28,6 +26,7 @@ import bisq.core.payment.PaymentAccount;
import bisq.core.payment.USPostalMoneyOrderAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.USPostalMoneyOrderAccountPayload;
+import bisq.core.payment.validation.USPostalMoneyOrderValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java
index 9eaa7a8156..bbf9fc3b81 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/UpholdForm.java
@@ -19,14 +19,13 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
-import bisq.desktop.util.validation.UpholdValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.UpholdAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.UpholdAccountPayload;
+import bisq.core.payment.validation.UpholdValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/WeChatPayForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/WeChatPayForm.java
index 80d5e621e9..238a0acee1 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/WeChatPayForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/WeChatPayForm.java
@@ -17,14 +17,13 @@
package bisq.desktop.components.paymentmethods;
-import bisq.desktop.util.validation.WeChatPayValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.WeChatPayAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.WeChatPayAccountPayload;
+import bisq.core.payment.validation.WeChatPayValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java b/desktop/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java
index b5bea066be..dd285bac84 100644
--- a/desktop/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java
+++ b/desktop/src/main/java/bisq/desktop/components/paymentmethods/WesternUnionForm.java
@@ -20,8 +20,6 @@ package bisq.desktop.components.paymentmethods;
import bisq.desktop.components.InputTextField;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.EmailValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.BankUtil;
import bisq.core.locale.Country;
@@ -33,6 +31,7 @@ import bisq.core.payment.CountryBasedPaymentAccount;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.WesternUnionAccountPayload;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.validation.InputValidator;
diff --git a/desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java b/desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java
index 1a1b294547..6609c2d338 100644
--- a/desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java
+++ b/desktop/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java
@@ -76,29 +76,6 @@ import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.AdvancedCashValidator;
-import bisq.desktop.util.validation.AliPayValidator;
-import bisq.desktop.util.validation.AustraliaPayidValidator;
-import bisq.desktop.util.validation.BICValidator;
-import bisq.desktop.util.validation.CapitualValidator;
-import bisq.desktop.util.validation.ChaseQuickPayValidator;
-import bisq.desktop.util.validation.ClearXchangeValidator;
-import bisq.desktop.util.validation.F2FValidator;
-import bisq.desktop.util.validation.HalCashValidator;
-import bisq.desktop.util.validation.InteracETransferValidator;
-import bisq.desktop.util.validation.JapanBankTransferValidator;
-import bisq.desktop.util.validation.LengthValidator;
-import bisq.desktop.util.validation.MoneyBeamValidator;
-import bisq.desktop.util.validation.PerfectMoneyValidator;
-import bisq.desktop.util.validation.PopmoneyValidator;
-import bisq.desktop.util.validation.PromptPayValidator;
-import bisq.desktop.util.validation.RevolutValidator;
-import bisq.desktop.util.validation.SwishValidator;
-import bisq.desktop.util.validation.TransferwiseValidator;
-import bisq.desktop.util.validation.USPostalMoneyOrderValidator;
-import bisq.desktop.util.validation.UpholdValidator;
-import bisq.desktop.util.validation.WeChatPayValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.Res;
import bisq.core.offer.OfferRestrictions;
@@ -116,6 +93,28 @@ import bisq.core.payment.RevolutAccount;
import bisq.core.payment.USPostalMoneyOrderAccount;
import bisq.core.payment.WesternUnionAccount;
import bisq.core.payment.payload.PaymentMethod;
+import bisq.core.payment.validation.AdvancedCashValidator;
+import bisq.core.payment.validation.AliPayValidator;
+import bisq.core.payment.validation.AustraliaPayidValidator;
+import bisq.core.payment.validation.BICValidator;
+import bisq.core.payment.validation.CapitualValidator;
+import bisq.core.payment.validation.ChaseQuickPayValidator;
+import bisq.core.payment.validation.EmailOrMobileNrValidator;
+import bisq.core.payment.validation.F2FValidator;
+import bisq.core.payment.validation.HalCashValidator;
+import bisq.core.payment.validation.InteracETransferValidator;
+import bisq.core.payment.validation.JapanBankTransferValidator;
+import bisq.core.payment.validation.LengthValidator;
+import bisq.core.payment.validation.MoneyBeamValidator;
+import bisq.core.payment.validation.PerfectMoneyValidator;
+import bisq.core.payment.validation.PopmoneyValidator;
+import bisq.core.payment.validation.PromptPayValidator;
+import bisq.core.payment.validation.RevolutValidator;
+import bisq.core.payment.validation.SwishValidator;
+import bisq.core.payment.validation.TransferwiseValidator;
+import bisq.core.payment.validation.USPostalMoneyOrderValidator;
+import bisq.core.payment.validation.UpholdValidator;
+import bisq.core.payment.validation.WeChatPayValidator;
import bisq.core.util.FormattingUtils;
import bisq.core.util.coin.CoinFormatter;
@@ -164,7 +163,7 @@ public class FiatAccountsView extends PaymentAccountsView list = PaymentMethod.getPaymentMethods().stream()
+ List list = PaymentMethod.paymentMethods.stream()
.filter(PaymentMethod::isFiat)
.sorted()
.collect(Collectors.toList());
diff --git a/desktop/src/main/java/bisq/desktop/main/account/content/notifications/MobileNotificationsView.java b/desktop/src/main/java/bisq/desktop/main/account/content/notifications/MobileNotificationsView.java
index 595bd50a2b..1501812adf 100644
--- a/desktop/src/main/java/bisq/desktop/main/account/content/notifications/MobileNotificationsView.java
+++ b/desktop/src/main/java/bisq/desktop/main/account/content/notifications/MobileNotificationsView.java
@@ -25,8 +25,6 @@ import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.FormBuilder;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.PercentageNumberValidator;
-
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
@@ -40,6 +38,7 @@ import bisq.core.notifications.alerts.market.MarketAlerts;
import bisq.core.notifications.alerts.price.PriceAlert;
import bisq.core.notifications.alerts.price.PriceAlertFilter;
import bisq.core.payment.PaymentAccount;
+import bisq.core.payment.validation.PercentageNumberValidator;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.user.User;
diff --git a/desktop/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java b/desktop/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java
index 10e95270cc..937a8b3801 100644
--- a/desktop/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java
+++ b/desktop/src/main/java/bisq/desktop/main/account/content/password/PasswordView.java
@@ -31,7 +31,6 @@ import bisq.desktop.main.account.content.seedwords.SeedWordsView;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.Layout;
import bisq.desktop.util.validation.PasswordValidator;
-
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.locale.Res;
import bisq.common.crypto.ScryptUtil;
diff --git a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java
index 84e8b00cd5..b1bd166f0b 100644
--- a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java
@@ -27,10 +27,6 @@ import bisq.desktop.main.settings.SettingsView;
import bisq.desktop.main.settings.preferences.PreferencesView;
import bisq.desktop.util.DisplayUtils;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.BtcValidator;
-import bisq.desktop.util.validation.FiatVolumeValidator;
-import bisq.desktop.util.validation.SecurityDepositValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.btc.wallet.Restrictions;
import bisq.core.locale.CurrencyUtil;
@@ -46,6 +42,9 @@ import bisq.core.offer.OfferRestrictions;
import bisq.core.offer.OfferUtil;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
+import bisq.core.payment.validation.BtcValidator;
+import bisq.core.payment.validation.FiatVolumeValidator;
+import bisq.core.payment.validation.SecurityDepositValidator;
import bisq.core.provider.fee.FeeService;
import bisq.core.provider.price.MarketPrice;
import bisq.core.provider.price.PriceFeedService;
diff --git a/desktop/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModel.java
index 9628d9b12b..123be11735 100644
--- a/desktop/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModel.java
@@ -20,12 +20,11 @@ package bisq.desktop.main.offer.createoffer;
import bisq.desktop.Navigation;
import bisq.desktop.common.model.ViewModel;
import bisq.desktop.main.offer.MutableOfferViewModel;
-import bisq.desktop.util.validation.BtcValidator;
-import bisq.desktop.util.validation.FiatVolumeValidator;
-import bisq.desktop.util.validation.SecurityDepositValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.offer.OfferUtil;
+import bisq.core.payment.validation.BtcValidator;
+import bisq.core.payment.validation.FiatVolumeValidator;
+import bisq.core.payment.validation.SecurityDepositValidator;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
index e2d865e347..098240a280 100644
--- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
@@ -349,7 +349,7 @@ abstract class OfferBookViewModel extends ActivatableViewModel {
}
ObservableList getPaymentMethods() {
- ObservableList list = FXCollections.observableArrayList(PaymentMethod.getPaymentMethods());
+ ObservableList list = FXCollections.observableArrayList(PaymentMethod.paymentMethods);
if (preferences.isHideNonAccountPaymentMethods() && user.getPaymentAccounts() != null) {
Set supportedPaymentMethods = user.getPaymentAccounts().stream()
.map(PaymentAccount::getPaymentMethod).collect(Collectors.toSet());
diff --git a/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java
index 3558e46071..1cac6ad2e4 100644
--- a/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java
@@ -27,8 +27,6 @@ import bisq.desktop.main.offer.OfferViewModelUtil;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.DisplayUtils;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.BtcValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.btc.wallet.Restrictions;
import bisq.core.locale.CurrencyUtil;
@@ -40,6 +38,7 @@ import bisq.core.offer.OfferRestrictions;
import bisq.core.offer.OfferUtil;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
+import bisq.core.payment.validation.BtcValidator;
import bisq.core.provider.fee.FeeService;
import bisq.core.trade.Trade;
import bisq.core.util.FormattingUtils;
diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/EditCustomExplorerWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/EditCustomExplorerWindow.java
index c1340d99e9..98e9f9e160 100644
--- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/EditCustomExplorerWindow.java
+++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/EditCustomExplorerWindow.java
@@ -22,9 +22,8 @@ import bisq.desktop.components.AutoTooltipLabel;
import bisq.desktop.components.InputTextField;
import bisq.desktop.main.overlays.Overlay;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.LengthValidator;
-
import bisq.core.locale.Res;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.validation.UrlInputValidator;
import bisq.common.util.Tuple2;
diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java
index daa812760e..e4cecd23de 100644
--- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java
+++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/ManualPayoutTxWindow.java
@@ -23,8 +23,6 @@ import bisq.desktop.components.InputTextField;
import bisq.desktop.main.overlays.Overlay;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.GUIUtil;
-import bisq.desktop.util.validation.LengthValidator;
-import bisq.desktop.util.validation.PercentageNumberValidator;
import bisq.core.api.CoreMoneroConnectionsService;
import bisq.core.btc.exceptions.TransactionVerificationException;
import bisq.core.btc.exceptions.TxBroadcastException;
@@ -33,6 +31,8 @@ import bisq.core.btc.wallet.TradeWalletService;
import bisq.core.btc.wallet.TxBroadcaster;
import bisq.core.btc.wallet.WalletsManager;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.LengthValidator;
+import bisq.core.payment.validation.PercentageNumberValidator;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.mediation.MediationManager;
import bisq.core.user.BlockChainExplorer;
diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/SignPaymentAccountsWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/SignPaymentAccountsWindow.java
index 27dd7c21c4..d63a8d0a95 100644
--- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/SignPaymentAccountsWindow.java
+++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/SignPaymentAccountsWindow.java
@@ -170,7 +170,7 @@ public class SignPaymentAccountsWindow extends Overlay getPaymentMethods() {
- return PaymentMethod.getPaymentMethods().stream()
+ return PaymentMethod.paymentMethods.stream()
.filter(PaymentMethod::isFiat)
.filter(PaymentMethod::hasChargebackRisk)
.collect(Collectors.toList());
diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/UpdateRevolutAccountWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/UpdateRevolutAccountWindow.java
index 9eaca8bbed..9dd214efc9 100644
--- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/UpdateRevolutAccountWindow.java
+++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/UpdateRevolutAccountWindow.java
@@ -20,10 +20,9 @@ package bisq.desktop.main.overlays.windows;
import bisq.desktop.components.InputTextField;
import bisq.desktop.main.overlays.Overlay;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.RevolutValidator;
-
import bisq.core.locale.Res;
import bisq.core.payment.RevolutAccount;
+import bisq.core.payment.validation.RevolutValidator;
import bisq.core.user.User;
import javafx.scene.Scene;
diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java
index bbbe5cf78a..544b60ae57 100644
--- a/desktop/src/main/java/bisq/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java
@@ -19,14 +19,13 @@ package bisq.desktop.main.portfolio.duplicateoffer;
import bisq.desktop.Navigation;
import bisq.desktop.main.offer.MutableOfferViewModel;
-import bisq.desktop.util.validation.BtcValidator;
-import bisq.desktop.util.validation.FiatVolumeValidator;
-import bisq.desktop.util.validation.SecurityDepositValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;
import bisq.core.offer.OfferUtil;
+import bisq.core.payment.validation.BtcValidator;
+import bisq.core.payment.validation.FiatVolumeValidator;
+import bisq.core.payment.validation.SecurityDepositValidator;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferViewModel.java
index 647ae59d51..d5e32aec78 100644
--- a/desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferViewModel.java
@@ -19,13 +19,12 @@ package bisq.desktop.main.portfolio.editoffer;
import bisq.desktop.Navigation;
import bisq.desktop.main.offer.MutableOfferViewModel;
-import bisq.desktop.util.validation.BtcValidator;
-import bisq.desktop.util.validation.FiatVolumeValidator;
-import bisq.desktop.util.validation.SecurityDepositValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.offer.OfferUtil;
import bisq.core.offer.OpenOffer;
+import bisq.core.payment.validation.BtcValidator;
+import bisq.core.payment.validation.FiatVolumeValidator;
+import bisq.core.payment.validation.SecurityDepositValidator;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.util.FormattingUtils;
diff --git a/desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java b/desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java
index 0b1251a46c..5a8a44fa46 100644
--- a/desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java
+++ b/desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java
@@ -30,8 +30,6 @@ import bisq.desktop.main.overlays.windows.EditCustomExplorerWindow;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.ImageUtil;
import bisq.desktop.util.Layout;
-import bisq.desktop.util.validation.BtcValidator;
-
import bisq.core.btc.wallet.Restrictions;
import bisq.core.filter.Filter;
import bisq.core.filter.FilterManager;
@@ -45,6 +43,7 @@ import bisq.core.locale.Res;
import bisq.core.locale.TradeCurrency;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
+import bisq.core.payment.validation.BtcValidator;
import bisq.core.provider.fee.FeeService;
import bisq.core.user.Preferences;
import bisq.core.user.User;
diff --git a/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
index 6ca4dbdd90..28c23eab33 100644
--- a/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
@@ -17,9 +17,6 @@
package bisq.desktop.main.offer.createoffer;
-import bisq.desktop.util.validation.BtcValidator;
-import bisq.desktop.util.validation.SecurityDepositValidator;
-
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.btc.model.XmrAddressEntry;
import bisq.core.btc.wallet.XmrWalletService;
@@ -33,6 +30,8 @@ import bisq.core.offer.OfferPayload;
import bisq.core.offer.OfferUtil;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
+import bisq.core.payment.validation.BtcValidator;
+import bisq.core.payment.validation.SecurityDepositValidator;
import bisq.core.provider.fee.FeeService;
import bisq.core.provider.price.MarketPrice;
import bisq.core.provider.price.PriceFeedService;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
index 1de80967cb..638393d431 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
@@ -1,7 +1,7 @@
package bisq.desktop.util.validation;
import bisq.core.locale.Res;
-
+import bisq.core.payment.validation.AccountNrValidator;
import java.util.Locale;
import org.junit.Before;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/AdvancedCashValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/AdvancedCashValidatorTest.java
index 4d505bc23e..a373251073 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/AdvancedCashValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/AdvancedCashValidatorTest.java
@@ -2,6 +2,8 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.AdvancedCashValidator;
+import bisq.core.payment.validation.EmailValidator;
import bisq.core.util.validation.RegexValidator;
import bisq.common.config.BaseCurrencyNetwork;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/BranchIdValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/BranchIdValidatorTest.java
index c1809814e7..3e0a4f36a0 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/BranchIdValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/BranchIdValidatorTest.java
@@ -1,7 +1,7 @@
package bisq.desktop.util.validation;
import bisq.core.locale.Res;
-
+import bisq.core.payment.validation.BranchIdValidator;
import java.util.Locale;
import org.junit.Before;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/BtcValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/BtcValidatorTest.java
index c7617831b6..a768ff7269 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/BtcValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/BtcValidatorTest.java
@@ -22,6 +22,7 @@ import bisq.common.config.Config;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.BtcValidator;
import bisq.core.util.coin.CoinFormatter;
import bisq.core.util.coin.ImmutableCoinFormatter;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/CapitualValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/CapitualValidatorTest.java
index 36260dfdff..1d5e814a83 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/CapitualValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/CapitualValidatorTest.java
@@ -2,6 +2,7 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.CapitualValidator;
import bisq.core.util.validation.RegexValidator;
import bisq.common.config.BaseCurrencyNetwork;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/FiatVolumeValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/FiatVolumeValidatorTest.java
index c7f53d5f72..13e468b5db 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/FiatVolumeValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/FiatVolumeValidatorTest.java
@@ -19,7 +19,7 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
-
+import bisq.core.payment.validation.FiatVolumeValidator;
import bisq.common.config.BaseCurrencyNetwork;
import bisq.common.config.Config;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferAnswerValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferAnswerValidatorTest.java
index 2fe20b03ae..ba6022c5f4 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferAnswerValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferAnswerValidatorTest.java
@@ -19,6 +19,8 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.InteracETransferAnswerValidator;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.validation.RegexValidator;
import bisq.common.config.BaseCurrencyNetwork;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferQuestionValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferQuestionValidatorTest.java
index cc39b08202..3ebe865f9d 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferQuestionValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferQuestionValidatorTest.java
@@ -19,6 +19,8 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.InteracETransferQuestionValidator;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.validation.RegexValidator;
import bisq.common.config.BaseCurrencyNetwork;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferValidatorTest.java
index ebcd610e40..94f8a04106 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/InteracETransferValidatorTest.java
@@ -19,6 +19,11 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.EmailValidator;
+import bisq.core.payment.validation.InteracETransferAnswerValidator;
+import bisq.core.payment.validation.InteracETransferQuestionValidator;
+import bisq.core.payment.validation.InteracETransferValidator;
+import bisq.core.payment.validation.LengthValidator;
import bisq.core.util.validation.RegexValidator;
import bisq.common.config.BaseCurrencyNetwork;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/LengthValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/LengthValidatorTest.java
index 0ae7096c8f..a4d7464335 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/LengthValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/LengthValidatorTest.java
@@ -19,7 +19,7 @@ package bisq.desktop.util.validation;
import bisq.core.locale.CurrencyUtil;
import bisq.core.locale.Res;
-
+import bisq.core.payment.validation.LengthValidator;
import bisq.common.config.BaseCurrencyNetwork;
import bisq.common.config.Config;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/NationalAccountIdValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/NationalAccountIdValidatorTest.java
index 2873b85ce6..111c11bfc2 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/NationalAccountIdValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/NationalAccountIdValidatorTest.java
@@ -1,7 +1,7 @@
package bisq.desktop.util.validation;
import bisq.core.locale.Res;
-
+import bisq.core.payment.validation.NationalAccountIdValidator;
import java.util.Locale;
import org.junit.Before;
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java
index 797665bd49..5672830d2f 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java
@@ -1,6 +1,7 @@
package bisq.desktop.util.validation;
import bisq.core.locale.Res;
+import bisq.core.payment.validation.PhoneNumberValidator;
import bisq.core.util.validation.InputValidator.ValidationResult;
import org.junit.Before;
diff --git a/proto/src/main/proto/grpc.proto b/proto/src/main/proto/grpc.proto
index dff649ab7c..411e9159d3 100644
--- a/proto/src/main/proto/grpc.proto
+++ b/proto/src/main/proto/grpc.proto
@@ -550,14 +550,19 @@ service PaymentAccounts {
}
rpc GetPaymentAccountForm (GetPaymentAccountFormRequest) returns (GetPaymentAccountFormReply) {
}
+ rpc GetPaymentAccountFormAsJson (GetPaymentAccountFormAsJsonRequest) returns (GetPaymentAccountFormAsJsonReply) {
+ }
rpc CreateCryptoCurrencyPaymentAccount (CreateCryptoCurrencyPaymentAccountRequest) returns (CreateCryptoCurrencyPaymentAccountReply) {
}
rpc GetCryptoCurrencyPaymentMethods (GetCryptoCurrencyPaymentMethodsRequest) returns (GetCryptoCurrencyPaymentMethodsReply) {
}
+ rpc ValidateFormField (ValidateFormFieldRequest) returns (ValidateFormFieldReply) {
+ }
}
message CreatePaymentAccountRequest {
- string payment_account_form = 1;
+ PaymentAccountForm payment_account_form = 1;
+ string payment_account_form_as_json = 2;
}
message CreatePaymentAccountReply {
@@ -583,7 +588,15 @@ message GetPaymentAccountFormRequest {
}
message GetPaymentAccountFormReply {
- string payment_account_form_json = 1;
+ PaymentAccountForm payment_account_form = 1;
+}
+
+message GetPaymentAccountFormAsJsonRequest {
+ string payment_method_id = 1;
+}
+
+message GetPaymentAccountFormAsJsonReply {
+ string payment_account_form_as_json = 1;
}
message CreateCryptoCurrencyPaymentAccountRequest {
@@ -604,6 +617,15 @@ message GetCryptoCurrencyPaymentMethodsReply {
repeated PaymentMethod payment_methods = 1;
}
+message ValidateFormFieldRequest {
+ PaymentAccountForm form = 1;
+ PaymentAccountFormField.FieldId field_id = 2;
+ string value = 3;
+}
+
+message ValidateFormFieldReply {
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
// Price
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/proto/src/main/proto/pb.proto b/proto/src/main/proto/pb.proto
index e5c6873e09..db07f1760c 100644
--- a/proto/src/main/proto/pb.proto
+++ b/proto/src/main/proto/pb.proto
@@ -1093,14 +1093,15 @@ message ClearXchangeAccountPayload {
}
message CountryBasedPaymentAccountPayload {
- string countryCode = 1;
+ string country_code = 1;
+ repeated string accepted_country_codes = 2;
oneof message {
- BankAccountPayload bank_account_payload = 2;
- CashDepositAccountPayload cash_deposit_account_payload = 3;
- SepaAccountPayload sepa_account_payload = 4;
- WesternUnionAccountPayload western_union_account_payload = 5;
- SepaInstantAccountPayload sepa_instant_account_payload = 6;
- F2FAccountPayload f2f_account_payload = 7;
+ BankAccountPayload bank_account_payload = 3;
+ CashDepositAccountPayload cash_deposit_account_payload = 4;
+ SepaAccountPayload sepa_account_payload = 5;
+ WesternUnionAccountPayload western_union_account_payload = 6;
+ SepaInstantAccountPayload sepa_instant_account_payload = 7;
+ F2FAccountPayload f2f_account_payload = 8;
UpiAccountPayload upi_account_payload = 9;
PaytmAccountPayload paytm_account_payload = 10;
IfscBasedAccountPayload ifsc_based_account_payload = 11;
@@ -1111,6 +1112,7 @@ message CountryBasedPaymentAccountPayload {
StrikeAccountPayload strike_account_payload = 16;
TikkieAccountPayload tikkie_account_payload = 17;
TransferwiseUsdAccountPayload transferwise_usd_account_payload = 18;
+ SwiftAccountPayload swift_account_payload = 19;
}
}
@@ -1207,14 +1209,12 @@ message SepaAccountPayload {
string iban = 2;
string bic = 3;
string email = 4 [deprecated = true];
- repeated string accepted_country_codes = 5;
}
message SepaInstantAccountPayload {
string holder_name = 1;
string iban = 2;
string bic = 3;
- repeated string accepted_country_codes = 4;
}
message CryptoCurrencyAccountPayload {
@@ -2071,3 +2071,96 @@ message MockPayload {
string message_version = 1;
string message = 2;
}
+
+message PaymentAccountForm {
+ enum FormId {
+ REVOLUT = 0;
+ SEPA = 1;
+ TRANSFERWISE = 2;
+ CLEAR_X_CHANGE = 3;
+ SWIFT = 4;
+ F2F = 5;
+ STRIKE = 6;
+ }
+ FormId id = 1;
+ repeated PaymentAccountFormField fields = 2;
+}
+
+message PaymentAccountFormField {
+ enum FieldId {
+ ACCEPTED_COUNTRY_CODES = 0;
+ ACCOUNT_ID = 1;
+ ACCOUNT_NAME = 2;
+ ACCOUNT_NR = 3;
+ ACCOUNT_OWNER = 4;
+ ACCOUNT_TYPE = 5;
+ ANSWER = 6;
+ BANK_ACCOUNT_NAME = 7;
+ BANK_ACCOUNT_NUMBER = 8;
+ BANK_ACCOUNT_TYPE = 9;
+ BANK_ADDRESS = 10;
+ BANK_BRANCH = 11;
+ BANK_BRANCH_CODE = 12;
+ BANK_BRANCH_NAME = 13;
+ BANK_CODE = 14;
+ BANK_COUNTRY_CODE = 15;
+ BANK_ID = 16;
+ BANK_NAME = 17;
+ BANK_SWIFT_CODE = 18;
+ BENEFICIARY_ACCOUNT_NR = 19;
+ BENEFICIARY_ADDRESS = 20;
+ BENEFICIARY_CITY = 21;
+ BENEFICIARY_NAME = 22;
+ BENEFICIARY_PHONE = 23;
+ BIC = 24;
+ BRANCH_ID = 25;
+ CITY = 26;
+ CONTACT = 27;
+ COUNTRY = 28;
+ EMAIL = 29;
+ EMAIL_OR_MOBILE_NR = 30;
+ EXTRA_INFO = 31;
+ HOLDER_ADDRESS = 32;
+ HOLDER_EMAIL = 33;
+ HOLDER_NAME = 34;
+ HOLDER_TAX_ID = 35;
+ IBAN = 36;
+ IFSC = 37;
+ INTERMEDIARY_ADDRESS = 38;
+ INTERMEDIARY_BRANCH = 39;
+ INTERMEDIARY_COUNTRY_CODE = 40;
+ INTERMEDIARY_NAME = 41;
+ INTERMEDIARY_SWIFT_CODE = 42;
+ MOBILE_NR = 43;
+ NATIONAL_ACCOUNT_ID = 44;
+ PAYID = 45;
+ PIX_KEY = 46;
+ POSTAL_ADDRESS = 47;
+ PROMPT_PAY_ID = 48;
+ QUESTION = 49;
+ REQUIREMENTS = 50;
+ SALT = 51;
+ SORT_CODE = 52;
+ SPECIAL_INSTRUCTIONS = 53;
+ STATE = 54;
+ TRADE_CURRENCIES = 55;
+ USER_NAME = 56;
+ VIRTUAL_PAYMENT_ADDRESS = 57;
+ }
+ enum Component {
+ TEXT = 0;
+ SELECT_ONE = 1;
+ SELECT_MULTIPLE = 2;
+ }
+ FieldId id = 1;
+ Component component = 2;
+ string type = 3;
+ string label = 4;
+ string value = 5;
+ uint32 minLength = 6;
+ uint32 maxLength = 7;
+ repeated TradeCurrency supported_currencies = 8;
+ repeated Country supported_countries = 9;
+ repeated Country supported_sepa_euro_countries = 10;
+ repeated Country supported_sepa_non_euro_countries = 11;
+}
\ No newline at end of file