From 3db0ba46d088c58f6553efc84e1b2b8f2e604f3d Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sat, 1 Feb 2025 17:23:13 +1100 Subject: [PATCH] fix: Strip address from sending --- domainLookup.py | 2 +- main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/domainLookup.py b/domainLookup.py index 6cb04d0..268011d 100644 --- a/domainLookup.py +++ b/domainLookup.py @@ -114,7 +114,7 @@ def hip2(domain: str): # Catch all exceptions except Exception as e: - print(f"Hip2: Lookup failed with error: {e}") + print(f"Hip2: Lookup failed with error: {e}",flush=True) return "Hip2: Lookup failed." diff --git a/main.py b/main.py index e871ad8..1da423e 100644 --- a/main.py +++ b/main.py @@ -124,7 +124,7 @@ def send(): if address is None or amount is None: return redirect("/send?message=Invalid address or amount&address=" + address + "&amount=" + amount) - address_check = account_module.check_address(address,True,True) + address_check = account_module.check_address(address.strip(),True,True) if not address_check: return redirect("/send?message=Invalid address&address=" + address + "&amount=" + amount) @@ -720,7 +720,7 @@ def transfer(domain): address_check = account_module.check_address(address,True,True) if not address_check: - return redirect("/send?message=Invalid address&address=" + address) + return redirect("/manage/" + domain + "?error=Invalid address") address = address_check