chore: always bootstrap with default relays (nip7)

This commit is contained in:
Kieran 2023-02-01 11:47:05 +00:00
parent c22f7a6a6e
commit 1b4ac0d711
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import * as secp from '@noble/secp256k1';
import { RootState } from "State/Store";
import { setPrivateKey, setPublicKey, setRelays } from "State/Login";
import { EmailRegex } from "Const";
import { DefaultRelays, EmailRegex } from "Const";
import { bech32ToHex } from "Util";
import { HexKey } from "Nostr";
@ -77,7 +77,10 @@ export default function LoginPage() {
if ("getRelays" in window.nostr) {
let relays = await window.nostr.getRelays();
dispatch(setRelays({
relays: relays,
relays: {
...relays,
...Object.fromEntries(DefaultRelays.entries())
},
createdAt: 1
}));
}