From b35e7c68a643713d6de0258b841882d2a8d292a6 Mon Sep 17 00:00:00 2001 From: XMRZombie Date: Tue, 3 Dec 2024 14:22:06 +0000 Subject: [PATCH] Renamed EtherAddressValidator class for EVMAddressValidator Using this address validation for all EVM addresses instead of only Ethereum --- ...therAddressValidator.java => EVMAddressValidator.java} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename assets/src/main/java/haveno/asset/{EtherAddressValidator.java => EVMAddressValidator.java} (85%) diff --git a/assets/src/main/java/haveno/asset/EtherAddressValidator.java b/assets/src/main/java/haveno/asset/EVMAddressValidator.java similarity index 85% rename from assets/src/main/java/haveno/asset/EtherAddressValidator.java rename to assets/src/main/java/haveno/asset/EVMAddressValidator.java index 5c7a0b18f8..ca7d04b06d 100644 --- a/assets/src/main/java/haveno/asset/EtherAddressValidator.java +++ b/assets/src/main/java/haveno/asset/EVMAddressValidator.java @@ -27,14 +27,16 @@ package haveno.asset; * * @author Chris Beams * @since 0.7.0 + * + * Edit: renamed EVMAddressValidator for being used by all EVMs */ -public class EtherAddressValidator extends RegexAddressValidator { +public class EVMAddressValidator extends RegexAddressValidator { - public EtherAddressValidator() { + public EVMAddressValidator() { super("^(0x)?[0-9a-fA-F]{40}$"); } - public EtherAddressValidator(String errorMessageI18nKey) { + public EVMAddressValidator(String errorMessageI18nKey) { super("^(0x)?[0-9a-fA-F]{40}$", errorMessageI18nKey); } }