mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
Use APP_RELAYS as nostrconnect fallback
When the user has no NIP-65 write relays configured, getRelayUrls() was building the nostrconnect:// URI with a single relay (wss://relay.ditto.pub). Fall back to the full APP_RELAYS write list instead so the remote signer has more connection options during the handshake. Extract the default relay list into src/lib/appRelays.ts as a single source of truth, shared between App.tsx (defaultConfig) and useLoginActions.ts (nostrconnect fallback).
This commit is contained in:
3 files changed
+23
-9
No files matched your search
+2
-8
@@ -12,6 +12,7 @@ import { TooltipProvider } from "@/components/ui/tooltip";
|
||||
import { NostrLoginProvider } from '@nostrify/react/login';
|
||||
import { AppProvider } from '@/components/AppProvider';
|
||||
import { AppConfig } from '@/contexts/AppContext';
|
||||
import { APP_RELAYS } from '@/lib/appRelays';
|
||||
import AppRouter from './AppRouter';
|
||||
const head = createHead({
|
||||
plugins: [
|
||||
@@ -31,14 +32,7 @@ const queryClient = new QueryClient({
|
||||
|
||||
const defaultConfig: AppConfig = {
|
||||
theme: "light",
|
||||
relayMetadata: {
|
||||
relays: [
|
||||
{ url: 'wss://relay.ditto.pub', read: true, write: true },
|
||||
{ url: 'wss://relay.primal.net', read: true, write: true },
|
||||
{ url: 'wss://relay.damus.io', read: true, write: true },
|
||||
],
|
||||
updatedAt: 0,
|
||||
},
|
||||
relayMetadata: APP_RELAYS,
|
||||
blossomServerMetadata: {
|
||||
servers: [
|
||||
'https://blossom.ditto.pub/',
|
||||
|
||||
Reference in new issue
Block a user