Skip to content

Commit

Permalink
Boot on bunker login
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Nov 13, 2024
1 parent 5eae580 commit bd8be0e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/views/LoginBunker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {onDestroy} from "svelte"
import {Nip46Broker} from "@welshman/signer"
import {addSession, nip46Perms} from "@welshman/app"
import {normalizeRelayUrl} from "@welshman/util"
import {isKeyValid} from "src/util/nostr"
import {showWarning} from "src/partials/Toast.svelte"
import Input from "src/partials/Input.svelte"
Expand Down Expand Up @@ -42,10 +43,9 @@
return showWarning("That connection string doesn't have any relays.")
}
const success = await loginWithNip46(token, {pubkey, relays})
const success = await loginWithNip46(token, {pubkey, relays: relays.map(normalizeRelayUrl)})
if (success) {
abortController.abort()
boot()
}
} finally {
Expand All @@ -61,6 +61,8 @@
secret: init.clientSecret,
handler: {pubkey, relays: env.SIGNER_RELAYS},
})
boot()
}
})
Expand Down

0 comments on commit bd8be0e

Please sign in to comment.