From bda75b29b4b6f12976acf624d0e04b6b5015bba3 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 22 Sep 2025 10:35:31 -0700 Subject: [PATCH] Handle bunker login errors better --- .env.template | 2 +- src/app/components/LogInBunker.svelte | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index cff882ce..95f36d08 100644 --- a/.env.template +++ b/.env.template @@ -10,7 +10,7 @@ VITE_PLATFORM_ACCENT="#7161FF" VITE_PLATFORM_SECONDARY="#EB5E28" VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities." VITE_INDEXER_RELAYS=wss://purplepag.es/,wss://relay.damus.io/,wss://relay.nostr.band/,wss://indexer.coracle.social/ -VITE_SIGNER_RELAYS=wss://relay.nsec.app/,wss://bucket.coracle.social/ +VITE_SIGNER_RELAYS=wss://relay.nsec.app/,wss://offchain.pub/ VITE_NOTIFIER_PUBKEY=27b7c2ed89ef78322114225ea3ebf5f72c7767c2528d4d0c1854d039c00085df VITE_NOTIFIER_RELAY=wss://anchor.coracle.social/ VITE_VAPID_PUBLIC_KEY=BIt2D4BdgdbCowD_0d3Np6GbrIGHxd7aIEUeZNe3hQuRlHz02OhzvDaai0XSFoJYVzSzdMjdyW-QhvW9_yq8j4Y diff --git a/src/app/components/LogInBunker.svelte b/src/app/components/LogInBunker.svelte index 0a2a978a..84b76749 100644 --- a/src/app/components/LogInBunker.svelte +++ b/src/app/components/LogInBunker.svelte @@ -48,13 +48,20 @@ try { const {signerPubkey, connectSecret, relays} = Nip46Broker.parseBunkerUrl($bunker) - if (!signerPubkey || relays.length === 0) { + if (!signerPubkey) { return pushToast({ theme: "error", message: "Sorry, it looks like that's an invalid bunker link.", }) } + if (relays.length === 0) { + return pushToast({ + theme: "error", + message: "That bunker link does not include any relays.", + }) + } + controller.loading.set(true) const {clientSecret} = controller @@ -91,6 +98,7 @@ } const selectConnect = () => { + controller.loading.set(false) mode = "connect" }