mirror of
https://github.com/wownero/tippero.git
synced 2026-10-17 15:51:33 +02:00
Allow integrated addresses
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ coinspecs = {
|
||||
"symbol": "XMR",
|
||||
"atomic_units": 1e12,
|
||||
"denominations": [[1000000, 1, "piconero"], [1000000000, 1e6, "micronero"], [1000000000000, 1e9, "millinero"]],
|
||||
"address_length": [95, 95], # min/max size of addresses
|
||||
"address_length": [[95, 95], [106, 106]], # min/max size of addresses
|
||||
"address_prefix": ['4', '9'], # allowed prefixes of addresses
|
||||
"min_withdrawal_fee": 10000000000,
|
||||
"web_wallet_url": "https://mymonero.com/", # None is there's none
|
||||
|
||||
+11
-1
@@ -76,8 +76,18 @@ def GetIdentityFromPaymentID(p):
|
||||
identity = "freenode:"+identity
|
||||
return identity
|
||||
|
||||
def IsAddressLengthValid(address):
|
||||
if type(coinspecs.address_length[0]) == list:
|
||||
for allist in coinspecs.address_length:
|
||||
if len(address) >= allist[0] and len(address) <= allist[1]:
|
||||
return True
|
||||
else:
|
||||
if len(address) >= coinspecs.address_length[0] and len(address) <= coinspecs.address_length[1]:
|
||||
return True
|
||||
return False
|
||||
|
||||
def IsValidAddress(address):
|
||||
if len(address) < coinspecs.address_length[0] or len(address) > coinspecs.address_length[1]:
|
||||
if not IsAddressLengthValid(address):
|
||||
return False
|
||||
for prefix in coinspecs.address_prefix:
|
||||
if address.startswith(prefix):
|
||||
|
||||
Reference in New Issue
Block a user