fix P2wpkhAddress btc ltc validation (#1749)

* fix P2wpkhAddress btc ltc validation

* Update address_validator.dart
This commit is contained in:
Serhii 2024-10-16 16:28:24 +03:00 committed by GitHub
parent b56dcaca1c
commit cb75f08b35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,9 +36,9 @@ class AddressValidator extends TextValidator {
'|[0-9a-zA-Z]{105}|addr1[0-9a-zA-Z]{98}'; '|[0-9a-zA-Z]{105}|addr1[0-9a-zA-Z]{98}';
case CryptoCurrency.btc: case CryptoCurrency.btc:
pattern = pattern =
'${P2pkhAddress.regex.pattern}|${P2shAddress.regex.pattern}|${P2wpkhAddress.regex.pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}'; '${P2pkhAddress.regex.pattern}|${P2shAddress.regex.pattern}|${RegExp(r'(bc|tb)1q[ac-hj-np-z02-9]{25,39}}').pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}';
case CryptoCurrency.ltc: case CryptoCurrency.ltc:
pattern = '^${P2wpkhAddress.regex.pattern}\$|^${MwebAddress.regex.pattern}\$'; pattern = '^${RegExp(r'ltc1q[ac-hj-np-z02-9]{25,39}').pattern}\$|^${MwebAddress.regex.pattern}\$';
case CryptoCurrency.nano: case CryptoCurrency.nano:
pattern = '[0-9a-zA-Z_]+'; pattern = '[0-9a-zA-Z_]+';
case CryptoCurrency.banano: case CryptoCurrency.banano: