Handle bunker login errors better

This commit is contained in:
Jon Staab
2025-09-22 10:35:31 -07:00
parent 750830d593
commit bda75b29b4
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -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"
}