mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-06-07 22:12:45 -04:00
Prepared for 128-bit destinations
This commit is contained in:
parent
8ef9e55a22
commit
681efb422d
1 changed files with 2 additions and 2 deletions
|
@ -279,7 +279,7 @@ class Browser:
|
||||||
|
|
||||||
components = url.split(":")
|
components = url.split(":")
|
||||||
if len(components) == 1:
|
if len(components) == 1:
|
||||||
if len(components[0]) == 20:
|
if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
|
||||||
try:
|
try:
|
||||||
destination_hash = bytes.fromhex(components[0])
|
destination_hash = bytes.fromhex(components[0])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -288,7 +288,7 @@ class Browser:
|
||||||
else:
|
else:
|
||||||
raise ValueError("Malformed URL")
|
raise ValueError("Malformed URL")
|
||||||
elif len(components) == 2:
|
elif len(components) == 2:
|
||||||
if len(components[0]) == 20:
|
if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
|
||||||
try:
|
try:
|
||||||
destination_hash = bytes.fromhex(components[0])
|
destination_hash = bytes.fromhex(components[0])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue