From 4d9e36e78cec23cd86e92e4ff0f52d5caaa296cd Mon Sep 17 00:00:00 2001 From: Koen Rijpstra Date: Fri, 5 Apr 2024 16:50:29 +0200 Subject: [PATCH] Allow http:// --- src/lib/components/RPCMenu.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/RPCMenu.svelte b/src/lib/components/RPCMenu.svelte index 3b3412f..6355d4d 100644 --- a/src/lib/components/RPCMenu.svelte +++ b/src/lib/components/RPCMenu.svelte @@ -27,7 +27,11 @@ if (!rpcUrlValue) { currentRPC.set("https://api.mainnet-beta.solana.com"); } - if (!rpcUrlValue.startsWith("https://") && rpcUrlValue !== "") { + if ( + rpcUrlValue !== "" && + !rpcUrlValue.startsWith("http://") && + !rpcUrlValue.startsWith("https://") + ) { rpcUrlValue = "https://" + rpcUrlValue; } currentRPC.set(rpcUrlValue);