Refactor chat and market modules for improved integration and maintainability

- Remove deprecated Nostr chat and relay hub components, transitioning to a modular chat service for better encapsulation.
- Update App.vue and Navbar.vue to utilize the new chat module, enhancing user experience with automatic peer management.
- Simplify event handling and connection logic in ChatComponent.vue, ensuring compatibility with the new chat service architecture.
- Adjust market settings and order history components to reflect changes in the chat module, improving overall coherence in the application structure.
- Clean up unused imports and streamline configuration access for better performance and maintainability.
This commit is contained in:
padreug 2025-09-05 01:44:15 +02:00
parent 63de083909
commit 17c07c37a0
17 changed files with 63 additions and 2222 deletions

View file

@ -18,7 +18,6 @@ interface PushConfig {
interface MarketConfig {
defaultNaddr: string
supportedRelays: string[]
lightningEnabled: boolean
defaultCurrency: string
}
@ -65,14 +64,6 @@ export const config: AppConfig = {
},
market: {
defaultNaddr: import.meta.env.VITE_MARKET_NADDR || '',
supportedRelays: parseJsonEnv(import.meta.env.VITE_MARKET_RELAYS, [
'ws://127.0.0.1:7777',
'wss://relay.damus.io',
'wss://relay.snort.social',
'wss://nostr-pub.wellorder.net',
'wss://nostr.zebedee.cloud',
'wss://nostr.walletofsatoshi.com'
]),
lightningEnabled: Boolean(import.meta.env.VITE_LIGHTNING_ENABLED),
defaultCurrency: import.meta.env.VITE_MARKET_DEFAULT_CURRENCY || 'sat'
},
@ -119,7 +110,8 @@ export const configUtils = {
},
getMarketRelays: (): string[] => {
return config.market.supportedRelays
// Market now uses the same relays as the main Nostr configuration
return config.nostr.relays
}
}