Add read only relays for testing phase except for plebdevs relay

This commit is contained in:
austinkelsay 2024-10-13 14:12:20 -05:00
parent e96666b7af
commit 0ca731f542
2 changed files with 6 additions and 3 deletions

View File

@ -6,9 +6,13 @@ import appConfig from "@/config/appConfig";
const NDKContext = createContext(null);
const readOnlyRelays = ["wss://nostr21.com/", "wss://nostr.wine/", "wss://yestr.me/", "wss://lightningrelay.com/", "wss://nostr.land/", "wss://us.nsotr.land", "wss://relay.keychat.io"];
export const NDKProvider = ({ children }) => {
const [ndk, setNdk] = useState(null);
const [userRelays, setUserRelays] = useLocalStorage("userRelays", appConfig.defaultRelayUrls);
// todo: remove this after testing phase
// const [userRelays, setUserRelays] = useLocalStorage("userRelays", appConfig.defaultRelayUrls);
const [userRelays, setUserRelays] = useState(readOnlyRelays);
const createNDKInstance = (relays) => {
const allRelays = [...new Set([...appConfig.defaultRelayUrls, ...relays])];

View File

@ -13,9 +13,8 @@ import { createRole } from "@/db/models/roleModels";
import appConfig from "@/config/appConfig";
// todo update EMAIL_FROM to be a plebdevs email
// TODO: remove hardcoded relays from here after testing phase
const ndk = new NDK({
explicitRelayUrls: [...appConfig.defaultRelayUrls, "wss://relay.damus.io/", "wss://relay.snort.social/"],
explicitRelayUrls: appConfig.defaultRelayUrls
});
const authorize = async (pubkey) => {