mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	Merge branch 'litecoin' into 'master'
add litecoin address native segwit format See merge request fdroid/fdroidserver!1332
This commit is contained in:
		
						commit
						5968cfe7e0
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -430,7 +430,7 @@ valuetypes = {
 | 
			
		|||
                   ["Bitcoin"]),
 | 
			
		||||
 | 
			
		||||
    FieldValidator("Litecoin address",
 | 
			
		||||
                   r'^[LM3][a-km-zA-HJ-NP-Z1-9]{26,33}$',
 | 
			
		||||
                   r'^([LM3][a-km-zA-HJ-NP-Z1-9]{26,33}|ltc1[a-km-z0-9]{39})$',
 | 
			
		||||
                   ["Litecoin"]),
 | 
			
		||||
 | 
			
		||||
    FieldValidator("Repo Type",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,7 +128,7 @@ class MetadataTest(unittest.TestCase):
 | 
			
		|||
 | 
			
		||||
        fdroidserver.metadata.warnings_action = 'error'
 | 
			
		||||
 | 
			
		||||
        # some valid addresses (L, M, 3)
 | 
			
		||||
        # some valid addresses (L, M, 3, segwit)
 | 
			
		||||
        self.assertIsNone(
 | 
			
		||||
            validator.check('LgeGrrrrJAxyXprrPrrBrrX5Qrrrrrrrrd', 'fake.app.id')
 | 
			
		||||
        )
 | 
			
		||||
| 
						 | 
				
			
			@ -136,6 +136,11 @@ class MetadataTest(unittest.TestCase):
 | 
			
		|||
            validator.check('MrrrrrrrJAxyXpanPtrrRAX5QHxvUJo8id', 'fake.app.id')
 | 
			
		||||
        )
 | 
			
		||||
        self.assertIsNone(validator.check('3rereVr9rAryrranrrrrrAXrrHx', 'fake.app.id'))
 | 
			
		||||
        self.assertIsNone(
 | 
			
		||||
            validator.check(
 | 
			
		||||
                'ltc1q7euacwhn6ef99vcfa57mute92q572aqsc4c2j5', '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