Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat EtherAddressValidator for EVMAddressValidator #1452

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
*
* @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);
}
}
2 changes: 1 addition & 1 deletion assets/src/main/java/haveno/asset/Erc20Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
public abstract class Erc20Token extends Token {

public Erc20Token(String name, String tickerSymbol) {
super(name, tickerSymbol, new EtherAddressValidator());
super(name, tickerSymbol, new EVMAddressValidator());
}
}
4 changes: 2 additions & 2 deletions assets/src/main/java/haveno/asset/coins/Ether.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Loading