CAKE-233 | added new XRP address format, starting with an X, to address_validator.dart
OleksandrSobol committed
Jan 13, 2021 at 19:26 UTC
eb425572d6103355e7555117f5f2ecaf4144dfe8
1 file changed
+2
-2
lib/core/address_validator.dart
+2
-2
@@ -43,7 +43,7 @@ class AddressValidator extends TextValidator {
43
case CryptoCurrency.xlm:
44
return '[0-9a-zA-Z]';
45
case CryptoCurrency.xrp:
46
- return '[0-9a-zA-Z]';
46
+ return '^[0-9a-zA-Z]{34}\$|^X[0-9a-zA-Z]{46}\$';
47
default:
48
return '[0-9a-zA-Z]';
49
}
@@ -82,7 +82,7 @@ class AddressValidator extends TextValidator {
82
case CryptoCurrency.xlm:
83
return [56];
84
case CryptoCurrency.xrp:
85
- return [34];
85
+ return null;
86
default:
87
return [];
88
}