From a81fd21af9d013fdcbf380df93ded45f4a2b5327 Mon Sep 17 00:00:00 2001 From: you Date: Thu, 19 Mar 2026 08:15:39 +0000 Subject: [PATCH] Pass server-disambiguated full pubkeys to map route view Was fetching /api/resolve-hops (with geographic disambiguation) then throwing away the result and still passing raw 1-byte prefixes. Now passes full pubkeys so the map doesn't re-disambiguate differently. --- public/packets.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/packets.js b/public/packets.js index 4a4402ee..0f566cd3 100644 --- a/public/packets.js +++ b/public/packets.js @@ -507,13 +507,12 @@ try { const resp = await fetch('/api/resolve-hops?hops=' + encodeURIComponent(pathHops.join(','))); const data = await resp.json(); - // Build array of {hop, name, pubkey} with resolved full pubkeys - const resolvedHops = pathHops.map(h => { - const name = data.resolved[h]; - // Find full pubkey from name if possible - return name || h; + // Pass full pubkeys (server-disambiguated) to map, falling back to short prefix + const resolvedKeys = pathHops.map(h => { + const r = data.resolved?.[h]; + return r?.pubkey || h; }); - sessionStorage.setItem('map-route-hops', JSON.stringify(pathHops)); + sessionStorage.setItem('map-route-hops', JSON.stringify(resolvedKeys)); window.location.hash = '#/map?route=1'; } catch { window.location.hash = '#/map';