chore: always bootstrap with default relays (nip7)
This commit is contained in:
parent
c22f7a6a6e
commit
1b4ac0d711
@ -5,7 +5,7 @@ import * as secp from '@noble/secp256k1';
|
|||||||
|
|
||||||
import { RootState } from "State/Store";
|
import { RootState } from "State/Store";
|
||||||
import { setPrivateKey, setPublicKey, setRelays } from "State/Login";
|
import { setPrivateKey, setPublicKey, setRelays } from "State/Login";
|
||||||
import { EmailRegex } from "Const";
|
import { DefaultRelays, EmailRegex } from "Const";
|
||||||
import { bech32ToHex } from "Util";
|
import { bech32ToHex } from "Util";
|
||||||
import { HexKey } from "Nostr";
|
import { HexKey } from "Nostr";
|
||||||
|
|
||||||
@ -77,7 +77,10 @@ export default function LoginPage() {
|
|||||||
if ("getRelays" in window.nostr) {
|
if ("getRelays" in window.nostr) {
|
||||||
let relays = await window.nostr.getRelays();
|
let relays = await window.nostr.getRelays();
|
||||||
dispatch(setRelays({
|
dispatch(setRelays({
|
||||||
relays: relays,
|
relays: {
|
||||||
|
...relays,
|
||||||
|
...Object.fromEntries(DefaultRelays.entries())
|
||||||
|
},
|
||||||
createdAt: 1
|
createdAt: 1
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user