Refactor PaymentService methods for clarity and consistency

- Rename methods in PaymentService for improved readability: payInvoiceWithUserWallet to payWithWallet, openExternalLightningWallet to openExternalWallet, and handlePaymentWithFallback to handlePayment.
- Update related composables (useTicketPurchase, useLightningPayment) to reflect method name changes, ensuring consistent usage across the application.
- Modify RelayHub initialization process to set relay URLs before calling initialize, enhancing configuration clarity.
- Remove legacy compatibility flags in RelayHub to streamline the codebase and improve maintainability.
This commit is contained in:
padreug 2025-09-05 15:23:03 +02:00
parent 0bced11623
commit 099c16abc9
5 changed files with 33 additions and 37 deletions

View file

@ -38,7 +38,8 @@ export const baseModule: ModulePlugin = {
container.provide('pwaService', pwaService)
// Initialize core services
await relayHub.initialize(options?.config?.nostr?.relays || [])
relayHub.setRelayUrls(options?.config?.nostr?.relays || [])
await relayHub.initialize()
await auth.initialize({
waitForDependencies: false, // Auth has no dependencies
maxRetries: 1