From 2b04b2d945b192a9120ed4173d137d1f6fc5d8af Mon Sep 17 00:00:00 2001 From: 9cfa <9cfa@172.16.100.2> Date: Mon, 13 Mar 2023 22:34:43 +0100 Subject: [PATCH] domain validation --- functions.py | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.py b/functions.py index f6fe18b..32e0711 100755 --- a/functions.py +++ b/functions.py @@ -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': diff --git a/main.py b/main.py index fa1bf63..1edfc23 100755 --- a/main.py +++ b/main.py @@ -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')