From 681efb422de78f9e2005f98141a78c8ceb146b43 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 30 Jun 2022 13:51:46 +0200 Subject: [PATCH] Prepared for 128-bit destinations --- nomadnet/ui/textui/Browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nomadnet/ui/textui/Browser.py b/nomadnet/ui/textui/Browser.py index 59578e1..8e40928 100644 --- a/nomadnet/ui/textui/Browser.py +++ b/nomadnet/ui/textui/Browser.py @@ -279,7 +279,7 @@ class Browser: components = url.split(":") if len(components) == 1: - if len(components[0]) == 20: + if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2: try: destination_hash = bytes.fromhex(components[0]) except Exception as e: @@ -288,7 +288,7 @@ class Browser: else: raise ValueError("Malformed URL") elif len(components) == 2: - if len(components[0]) == 20: + if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2: try: destination_hash = bytes.fromhex(components[0]) except Exception as e: