mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-18 05:00:29 +03:00
Update litecoin address regex
This commit is contained in:
parent
0048cb19d3
commit
91b5c85a7c
2 changed files with 18 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ valuetypes = {
|
|||
["Bitcoin"]),
|
||||
|
||||
FieldValidator("Litecoin address",
|
||||
r'^([LM3][a-km-zA-HJ-NP-Z1-9]{26,33}|ltc1[a-z0-9]{39})$',
|
||||
r'^([LM3][a-km-zA-HJ-NP-Z1-9]{26,33}|ltc1[ac-hj-np-z0-9]{39,59})$',
|
||||
["Litecoin"]),
|
||||
|
||||
FieldValidator("Repo Type",
|
||||
|
|
|
|||
|
|
@ -138,6 +138,23 @@ class MetadataTest(unittest.TestCase):
|
|||
'ltc1q7euacwhn6ef99vcfa57mute92q572aqsc4c2j5', 'fake.app.id'
|
||||
)
|
||||
)
|
||||
self.assertIsNone(
|
||||
validator.check('LYnHPyAsMZ77DiHTbP4gJATc2xugbkRpzq', 'fake.app.id')
|
||||
)
|
||||
self.assertIsNone(
|
||||
validator.check('MEp2J2AGxN6PaN44GdDH4Hh1H7SEVKqygt', 'fake.app.id')
|
||||
)
|
||||
self.assertIsNone(
|
||||
validator.check(
|
||||
'ltc1q8ls9ygtr2pkms8fav88ly4zz0rq9g6ck8g3z8c', 'fake.app.id'
|
||||
)
|
||||
)
|
||||
self.assertIsNone(
|
||||
validator.check(
|
||||
'ltc1pgdn5w8ctc0r4c738vzh7730rhxepw2ggx0ud9alsfjkz0v6zpkss9w4qaq',
|
||||
'fake.app.id',
|
||||
)
|
||||
)
|
||||
|
||||
# some invalid addresses (various special use/testnet addresses, invalid chars)
|
||||
self.assertRaises(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue