fix: normalize relay URLs

This commit is contained in:
Alejandro Gómez
2025-12-14 11:51:02 +01:00
parent 33614be77d
commit bef7369de9
17 changed files with 756 additions and 161 deletions

View File

@@ -8,6 +8,7 @@ import {
import { useCopy } from "../hooks/useCopy";
import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { normalizeRelayURL } from "@/lib/relay-url";
interface EncodeViewerProps {
args: string[];
@@ -66,7 +67,7 @@ export default function EncodeViewer({ args }: EncodeViewerProps) {
setError("Relay must be a WebSocket URL (ws:// or wss://)");
return;
}
setRelays([...relays, relayUrl]);
setRelays([...relays, normalizeRelayURL(relayUrl)]);
setNewRelay("");
setError(null);
} catch {