bug: getRelays not always available
This commit is contained in:
parent
4bfeb38cdf
commit
3d7661214c
@ -72,12 +72,15 @@ export default function LoginPage() {
|
||||
|
||||
async function doNip07Login() {
|
||||
let pubKey = await window.nostr.getPublicKey();
|
||||
let relays = await window.nostr.getRelays();
|
||||
dispatch(setPublicKey(pubKey));
|
||||
dispatch(setRelays({
|
||||
relays: relays,
|
||||
createdAt: 1
|
||||
}));
|
||||
|
||||
if ("getRelays" in window.nostr) {
|
||||
let relays = await window.nostr.getRelays();
|
||||
dispatch(setRelays({
|
||||
relays: relays,
|
||||
createdAt: 1
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
function altLogins() {
|
||||
|
Loading…
Reference in New Issue
Block a user