mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-30 11:54:22 +01:00
@@ -157,6 +157,8 @@ class AddressValidator extends TextValidator {
|
||||
pattern = '(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)';
|
||||
case CryptoCurrency.zano:
|
||||
pattern = r'([1-9A-HJ-NP-Za-km-z]{90,200})|(@[\w\d.-]+)';
|
||||
case CryptoCurrency.doge:
|
||||
pattern = r'^D[a-km-zA-HJ-NP-Z1-9]{25,34}';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -194,11 +194,19 @@ class UniversalAddressDetector {
|
||||
currency: CryptoCurrency.ltc,
|
||||
),
|
||||
|
||||
// Solana (Base58 format, 32-44 chars)
|
||||
// Dogecoin P2PKH
|
||||
_DetectionPattern(
|
||||
pattern: RegExp(r'^[1-9A-HJ-NP-Za-km-z]{32,44}$'),
|
||||
currency: CryptoCurrency.sol,
|
||||
pattern: RegExp(r'^D[a-km-zA-HJ-NP-Z1-9]{25,34}$'),
|
||||
currency: CryptoCurrency.doge,
|
||||
),
|
||||
|
||||
// TODO: commented out until a better approach is implemented.
|
||||
// as this will consider most addresses to be a valid Solana address
|
||||
// Solana (Base58 format, 32-44 chars)
|
||||
// _DetectionPattern(
|
||||
// pattern: RegExp(r'^[1-9A-HJ-NP-Za-km-z]{32,44}$'),
|
||||
// currency: CryptoCurrency.sol,
|
||||
// ),
|
||||
];
|
||||
|
||||
// Test each pattern in order of specificity
|
||||
|
||||
Reference in New Issue
Block a user