CW-320-validate-address-case (#934)

* feat: allow all-lowercase OR all-uppercase ltc1 addresses (btc1 already working)

* fix: ltc length
This commit is contained in:
Rafael Saes
2023-05-24 16:48:06 +03:00
committed by GitHub
parent 1ac74b3182
commit 9668863655
+3 -2
View File
@@ -61,10 +61,11 @@ class AddressValidator extends TextValidator {
case CryptoCurrency.dai:
case CryptoCurrency.dash:
case CryptoCurrency.eos:
case CryptoCurrency.ltc:
case CryptoCurrency.bch:
case CryptoCurrency.bnb:
return '[0-9a-zA-Z]';
case CryptoCurrency.ltc:
return '^(?!(ltc|LTC)1)[0-9a-zA-Z]*\$|(^LTC1[A-Z0-9]*\$)|(^ltc1[a-z0-9]*\$)';
case CryptoCurrency.hbar:
return '[0-9a-zA-Z.]';
case CryptoCurrency.zaddr:
@@ -119,7 +120,7 @@ class AddressValidator extends TextValidator {
case CryptoCurrency.eth:
return [42];
case CryptoCurrency.ltc:
return [34, 43];
return [34, 43, 63];
case CryptoCurrency.nano:
return [64, 65];
case CryptoCurrency.sc: