CAKE-281 | added addr1 address format validation for cardano
OleksandrSobol committed
Feb 23, 2021 at 20:38 UTC
270b5f4c782dd2a46f610b760ac8e5354f321681
1 file changed
+3
-2
lib/core/address_validator.dart
+3
-2
@@ -15,7 +15,8 @@ class AddressValidator extends TextValidator {
15
case CryptoCurrency.xmr:
16
return '[0-9a-zA-Z]';
17
case CryptoCurrency.ada:
18
- return '[0-9a-zA-Z]';
18
+ return '^[0-9a-zA-Z]{59}\$|^[0-9a-zA-Z]{92}\$|^[0-9a-zA-Z]{104}\$'
19
+ '|^[0-9a-zA-Z]{105}\$|^addr1[0-9a-zA-Z]{98}\$';
20
case CryptoCurrency.bch:
21
return '[0-9a-zA-Z]';
22
case CryptoCurrency.bnb:
@@ -54,7 +55,7 @@ class AddressValidator extends TextValidator {
55
case CryptoCurrency.xmr:
56
return [95, 106];
57
case CryptoCurrency.ada:
57
- return [59, 92, 104, 105];
58
+ return null;
59
case CryptoCurrency.bch:
60
return [42];
61
case CryptoCurrency.bnb: