CAKE-233 | added new XRP address format, starting with an X, to address_validator.dart

This commit is contained in:
OleksandrSobol 2021-01-13 19:26:02 +02:00
parent 41b436d9d4
commit eb425572d6

View file

@ -43,7 +43,7 @@ class AddressValidator extends TextValidator {
case CryptoCurrency.xlm:
return '[0-9a-zA-Z]';
case CryptoCurrency.xrp:
return '[0-9a-zA-Z]';
return '^[0-9a-zA-Z]{34}\$|^X[0-9a-zA-Z]{46}\$';
default:
return '[0-9a-zA-Z]';
}
@ -82,7 +82,7 @@ class AddressValidator extends TextValidator {
case CryptoCurrency.xlm:
return [56];
case CryptoCurrency.xrp:
return [34];
return null;
default:
return [];
}