Merge fac51914eeb6b5b71c333a23736da2eed857c5ca into 52f0c20c8cecaf74f136377783956b4aae21b58c

This commit is contained in:
XMRZombie 2025-04-14 03:07:05 +00:00 committed by GitHub
commit 7a41f4d50d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -28,6 +28,6 @@ package haveno.asset;
public abstract class Erc20Token extends Token {
public Erc20Token(String name, String tickerSymbol) {
super(name, tickerSymbol, new EtherAddressValidator());
super(name, tickerSymbol, new EVMAddressValidator());
}
}

View File

@ -18,11 +18,11 @@
package haveno.asset.coins;
import haveno.asset.Coin;
import haveno.asset.EtherAddressValidator;
import haveno.asset.EVMAddressValidator;
public class Ether extends Coin {
public Ether() {
super("Ether", "ETH", new EtherAddressValidator());
super("Ether", "ETH", new EVMAddressValidator());
}
}