domain validation

This commit is contained in:
9cfa 2023-03-13 22:34:43 +01:00
parent 435e7aae38
commit 2b04b2d945
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def checksumCheck(method, address):
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
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':
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':

View File

@ -113,7 +113,7 @@ def receive(method: str, address: str, callback: Union[str, None] = None):
session.close()
except Exception as 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:
## notify admin about the error
raise ErrorException(code=422,status="error",status_message='Invalid response from rpcServer')