domain validation
This commit is contained in:
parent
435e7aae38
commit
2b04b2d945
|
@ -35,7 +35,7 @@ def checksumCheck(method, address):
|
||||||
case 'btc':
|
case 'btc':
|
||||||
return decodeBase58(address) if address[0] == '1' or address[0] == '3' else True if address[0:3] == 'bc1' and segwit_addr.decode("bc", address)[0] != None else False
|
return decodeBase58(address) if address[0] == '1' or address[0] == '3' else True if address[0:3] == 'bc1' and segwit_addr.decode("bc", address)[0] != None else False
|
||||||
case 'btct':
|
case 'btct':
|
||||||
return decodeBase58(address) if address[0] == '1' or address[0] == '3' else True if address[0:3] == 'tb1' and segwit_addr.decode("tb", address)[0] != None else False
|
return decodeBase58(address) if address[0] == '2' else True if address[0:3] == 'tb1' and segwit_addr.decode("tb", address)[0] != None else False
|
||||||
case 'ltc':
|
case 'ltc':
|
||||||
return decodeBase58(address) if address[0] == '3' or address[0] == 'M' or address[0] == 'L' else True if address[0:4] == 'ltc1' and segwit_addr.decode("ltc", address)[0] != None else False
|
return decodeBase58(address) if address[0] == '3' or address[0] == 'M' or address[0] == 'L' else True if address[0:4] == 'ltc1' and segwit_addr.decode("ltc", address)[0] != None else False
|
||||||
case 'bch':
|
case 'bch':
|
||||||
|
|
2
main.py
2
main.py
|
@ -113,7 +113,7 @@ def receive(method: str, address: str, callback: Union[str, None] = None):
|
||||||
session.close()
|
session.close()
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
## notify admin about the error
|
## notify admin about the error
|
||||||
raise ErrorException(code=422,status="error",status_message='Invalid response from dbServer:'+str(error))
|
raise ErrorException(code=422,status="error",status_message='Invalid response from dbServer')
|
||||||
else:
|
else:
|
||||||
## notify admin about the error
|
## notify admin about the error
|
||||||
raise ErrorException(code=422,status="error",status_message='Invalid response from rpcServer')
|
raise ErrorException(code=422,status="error",status_message='Invalid response from rpcServer')
|
||||||
|
|
Loading…
Reference in New Issue