mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 09:29:48 +00:00
fix regex for xrp and wow
This commit is contained in:
parent
9590aa25b6
commit
82bad3a951
1 changed files with 6 additions and 2 deletions
|
@ -80,7 +80,7 @@ class AddressValidator extends TextValidator {
|
||||||
case CryptoCurrency.shib:
|
case CryptoCurrency.shib:
|
||||||
pattern = '0x[0-9a-zA-Z]+';
|
pattern = '0x[0-9a-zA-Z]+';
|
||||||
case CryptoCurrency.xrp:
|
case CryptoCurrency.xrp:
|
||||||
pattern = '[0-9a-zA-Z]{34}|X[0-9a-zA-Z]{46}';
|
pattern = '[0-9a-zA-Z]{34}|[0-9a-zA-Z]{33}|X[0-9a-zA-Z]{46}';
|
||||||
case CryptoCurrency.xhv:
|
case CryptoCurrency.xhv:
|
||||||
pattern = 'hvx|hvi|hvs[0-9a-zA-Z]+';
|
pattern = 'hvx|hvi|hvs[0-9a-zA-Z]+';
|
||||||
case CryptoCurrency.xag:
|
case CryptoCurrency.xag:
|
||||||
|
@ -282,10 +282,14 @@ class AddressValidator extends TextValidator {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CryptoCurrency.xmr:
|
case CryptoCurrency.xmr:
|
||||||
case CryptoCurrency.wow:
|
|
||||||
pattern = '(4[0-9a-zA-Z]{94})'
|
pattern = '(4[0-9a-zA-Z]{94})'
|
||||||
'|(8[0-9a-zA-Z]{94})'
|
'|(8[0-9a-zA-Z]{94})'
|
||||||
'|([0-9a-zA-Z]{106})';
|
'|([0-9a-zA-Z]{106})';
|
||||||
|
case CryptoCurrency.wow:
|
||||||
|
pattern = '(W[0-9a-zA-Z]{94})'
|
||||||
|
'|(W[0-9a-zA-Z]{94})'
|
||||||
|
'|(W[0-9a-zA-Z]{96})'
|
||||||
|
'|([0-9a-zA-Z]{106})';
|
||||||
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}|${P2wpkhAddress.regex.pattern}|${P2trAddress.regex.pattern}|${P2wshAddress.regex.pattern}|${SilentPaymentAddress.regex.pattern}';
|
||||||
|
|
Loading…
Reference in a new issue